/* ==============================================
   MysticBlood Portal — Clan detail page
   File: /home/mysticbloodsl/portal/public/css/clan.css
   Canon target:
   - Houses baseline
   - Bloodline detail as successful visual reference
   Scope kept on body.mbp-house because the real Blade uses it
============================================== */

/* =========================
   PAGE WIDTH / SPACING
   ========================= */

body.mbp-house main.mbp-main > .wrap{
    max-width: 1450px;
}

body.mbp-house .mbp-clan-page{
    display: block;
    margin-top: 28px;
    margin-bottom: 52px;
}

body.mbp-house .mbp-clan-panel{
    margin-bottom: 0;
}

body.mbp-house .mbp-house-top{
    align-items: stretch;
    gap: 24px;
    margin-bottom: 36px;
}

body.mbp-house .mbp-house-members{
    margin-top: 0;
    padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

body.mbp-house .panel.plain{
    border: 1px solid rgba(130, 130, 255, 0.18);
    background: rgba(8, 8, 14, 0.55);
    box-shadow: none;
}

/* =========================
   HERO
   ========================= */

body.mbp-house .hero{
    text-align: center;
}

body.mbp-house .hero h1{
    text-align: center;
    color: rgba(230, 195, 105, 0.98);
    text-shadow: 0 0 18px rgba(210, 165, 60, 0.14);
}

body.mbp-house .hero p{
    color: rgba(255,255,255,0.74);
}

/* =========================
   CARD TITLES
   ========================= */

body.mbp-house .mbp-house-card{
    min-height: 100%;
}

body.mbp-house .mbp-house-card .home-card-title,
body.mbp-house .mbp-house-members .home-card-title{
    text-align: center;
    margin-bottom: 22px;
    color: rgba(155,123,255,.78) !important;
    text-shadow: 0 0 10px rgba(155,123,255,.30);
    letter-spacing: 2px;
}

body.mbp-house .mbp-house-card .home-card-title .mbp-ico,
body.mbp-house .mbp-house-members .home-card-title .mbp-ico{
    width: 16px;
    height: 16px;
}

/* =========================
   LEADERSHIP
   ========================= */

body.mbp-house .mbp-leadership-list{
    gap: 12px;
    margin-top: 6px;
}

body.mbp-house .mbp-leader-row{
    min-height: 70px;
    padding: 13px 15px;
    border-radius: 14px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: none;
}

body.mbp-house .mbp-leader-text{
    display: flex;
    align-items: center;
    min-height: 30px;
}

body.mbp-house .mbp-leader-name{
    font-size: 0.98rem;
    line-height: 1.2;
}

body.mbp-house .mbp-leader-badge{
    align-self: center;
    white-space: nowrap;
}

body.mbp-house .mbp-rank-badge{
    text-align: center;
}

body.mbp-house .mbp-rank-princeps{
    background: rgba(210, 165, 60, 0.16);
    border-color: rgba(210, 165, 60, 0.32);
    color: rgba(230, 195, 105, 0.98);
    box-shadow: 0 0 18px rgba(210, 165, 60, 0.12);
}

/* =========================
   DETAILS
   ========================= */

body.mbp-house .mbp-house-details{
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
}

body.mbp-house .mbp-house-detail-row{
    min-height: 38px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
}

body.mbp-house .mbp-house-detail-label{
    letter-spacing: 0;
    opacity: 0.65;
    font-size: 0.9rem;
}

body.mbp-house .mbp-house-detail-value{
    text-align: right;
    font-weight: 650;
    font-size: 0.95rem;
}

body.mbp-house .mbp-house-detail-value a{
    color: inherit;
    text-decoration: none;
}

body.mbp-house .mbp-house-detail-value a:hover{
    text-decoration: underline;
}

/* Highlighted values like Bloodline */
body.mbp-house .mbp-house-details > .mbp-house-detail-row:nth-child(2) .mbp-house-detail-value{
    color: #7DF9FF;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(125, 249, 255, .18);
}

body.mbp-house .mbp-house-details > .mbp-house-detail-row:nth-child(3) .mbp-house-detail-value{
    color: #C67CFF;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(198, 124, 255, .18);
}

body.mbp-house .mbp-house-details > .mbp-house-detail-row:nth-child(4) .mbp-house-detail-value{
    color: rgba(230, 195, 105, 0.98);
    font-weight: 700;
    text-shadow: 0 0 14px rgba(210, 165, 60, 0.10);
}

/* =========================
   DESCRIPTION
   ========================= */

body.mbp-house .mbp-clan-desc-block{
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

body.mbp-house .mbp-clan-desc-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

body.mbp-house .mbp-clan-desc-label{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.72);
    text-transform: none;
    font-weight: 600;
}

body.mbp-house .mbp-clan-desc-body{
    display: block;
}

body.mbp-house .mbp-clan-desc-text{
    display: block;
    width: 100%;
    min-height: 78px;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.22);
    box-sizing: border-box;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.62;
    font-weight: 500;
    color: rgba(255,255,255,0.84);
    word-break: break-word;
    white-space: pre-line;
}

body.mbp-house .mbp-clan-desc-empty{
    color: rgba(255,255,255,0.52);
    font-weight: 600;
    font-style: italic;
}

/* =========================
   CLAN INSIGNIA
   ========================= */

body.mbp-house .mbp-house-card .mbp-house-logo{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
    width: 100%;
    min-height: 0;
}

body.mbp-house .mbp-house-card .mbp-logo-image{
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 16px;
    background: rgba(0,0,0,0.20);
    border: 1px solid rgba(255,255,255,0.08);
    box-sizing: border-box;
}

body.mbp-house .mbp-house-card .mbp-logo-image img{
    display: block;
    width: 100%;
    max-width: 250px;
    max-height: 340px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}

body.mbp-house .mbp-house-card .mbp-logo-empty{
    width: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255,255,255,0.52);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    background: rgba(255,255,255,0.015);
    padding: 24px 18px;
    box-sizing: border-box;
}

body.mbp-house .mbp-house-card .mbp-logo-empty-text{
    font-weight: 600;
    color: rgba(255,255,255,0.48);
}

body.mbp-house .mbp-clan-empty-manage{
    width: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    text-align: left;
    color: rgba(255,255,255,0.52);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    background: rgba(255,255,255,0.015);
    padding: 22px 18px;
    box-sizing: border-box;
}

body.mbp-house .mbp-clan-empty-manage-ico{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.72);
    margin: 0;
}

body.mbp-house .mbp-clan-empty-manage-ico .mbp-ico{
    display: block;
}

body.mbp-house .mbp-clan-empty-manage-dash{
    display: none;
}

body.mbp-house .mbp-clan-empty-manage-text{
    width: 100%;
    max-width: none;
    line-height: 1.45;
    font-weight: 600;
    color: rgba(255,255,255,0.62);
    text-align: left;
}

/* =========================
   UPLOAD / ACTIONS
   ========================= */

body.mbp-house .mbp-clan-inline-actions{
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
    width: 100%;
}

body.mbp-house .mbp-clan-upload-row{
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

body.mbp-house .mbp-clan-file{
    display: none !important;
}

body.mbp-house .mbp-clan-upload-label{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(110,140,255,0.16);
    background: rgba(255,255,255,0.02);
    color: #d8def7;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

body.mbp-house .mbp-clan-upload-label:hover{
    border-color: rgba(160,180,255,0.28);
    background: rgba(255,255,255,0.04);
}

body.mbp-house .mbp-clan-upload-label .mbp-ico{
    flex: 0 0 auto;
}

body.mbp-house .mbp-clan-inline-actions .btn{
    width: 100%;
    justify-content: center;
    min-height: 36px;
    padding-top: 0;
    padding-bottom: 0;
}

/* =========================
   STATUS BOX
   ========================= */

body.mbp-house .mbp-status-box{
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(110,140,255,0.16);
    background: rgba(255,255,255,0.03);
}

/* =========================
   HOUSES IN CLAN
   ========================= */

body.mbp-house .mbp-house-members .home-card-title{
    margin-bottom: 26px;
}

body.mbp-house .mbp-house-members .grid{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

body.mbp-house .mbp-house-members .grid > .mbp-member-row{
    width: 100%;
    max-width: 460px;
}

body.mbp-house .mbp-member-row{
    min-height: 76px;
    border-radius: 14px;
    background: rgba(0,0,0,0.20);
    border: 1px solid rgba(255,255,255,0.07);
    padding: 16px 18px;
}

body.mbp-house .mbp-member-left{
    min-width: 0;
}

body.mbp-house .mbp-member-ico{
    overflow: hidden;
}

body.mbp-house .mbp-member-ico img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

body.mbp-house .mbp-member-text{
    min-width: 0;
}

body.mbp-house .mbp-house-member-name{
    line-height: 1.2;
}

body.mbp-house .mbp-house-member-name a{
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .14s ease, border-color .14s ease, text-shadow .14s ease;
}

body.mbp-house .mbp-house-member-name a:hover{
    color: #f0e6ff;
    border-bottom-color: rgba(240,230,255,0.45);
    text-shadow: 0 0 10px rgba(155,123,255,0.18);
}

body.mbp-house .mbp-house-member-meta{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

body.mbp-house .mbp-member-badge{
    flex: 0 0 auto;
    white-space: nowrap;
}

body.mbp-house .mbp-member-badge .mbp-rank-badge.mbp-structure-vampire{
    color: #d14b4b;
    border-color: rgba(209,75,75,0.40);
    background: rgba(209,75,75,0.14);
}

body.mbp-house .mbp-member-badge .mbp-rank-badge.mbp-structure-lycan{
    color: #64d27a;
    border-color: rgba(100,210,122,0.34);
    background: rgba(100,210,122,0.12);
}

body.mbp-house .mbp-member-badge .mbp-rank-badge.mbp-structure-magic{
    color: #8f7cff;
    border-color: rgba(143,124,255,0.34);
    background: rgba(143,124,255,0.12);
}

body.mbp-house .mbp-members-empty{
    min-height: 160px;
}

/* =========================
   BACK ACTION
   ========================= */

body.mbp-house .mbp-bloodline-actions{
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

body.mbp-house .mbp-bloodline-actions .btn{
    min-width: 88px;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 12px;
}

/* =========================
   EDIT TRIGGER
   ========================= */

body.mbp-house .mbp-clan-edit-trigger{
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

body.mbp-house .mbp-clan-edit-trigger .mbp-ico{
    display: block;
}

body.mbp-house .mbp-clan-modal-cancel{
    cursor: pointer;
}

/* =========================
   MODAL
   ========================= */

body.mbp-house .mbp-clan-modal-toggle{
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.mbp-house .mbp-clan-modal-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(2px);
    z-index: 900;
    display: none;
}

body.mbp-house .mbp-clan-modal{
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 700px);
    max-height: min(88vh, 900px);
    overflow: auto;
    background: rgba(5,9,20,0.96);
    border: 1px solid rgba(110,140,255,0.22);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    z-index: 901;
    display: none;
}

body.mbp-house .mbp-clan-modal-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(110,140,255,0.12);
}

body.mbp-house .mbp-clan-modal-title{
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #d7defc;
}

body.mbp-house .mbp-clan-modal-close{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    color: #9aa6d1;
    border: 1px solid rgba(110,140,255,0.12);
    background: rgba(255,255,255,0.02);
    font-size: 18px;
    line-height: 1;
}

body.mbp-house .mbp-clan-modal-body{
    padding: 14px 16px 10px;
}

body.mbp-house .mbp-clan-modal-body textarea{
    width: 100%;
    min-height: 180px;
    resize: vertical;
    border-radius: 12px;
    border: 1px solid rgba(110,140,255,0.18);
    background: rgba(255,255,255,0.03);
    color: #e7ebff;
    padding: 12px 14px;
    outline: none;
    font: inherit;
    box-sizing: border-box;
}

body.mbp-house .mbp-clan-modal-help{
    margin-top: 10px;
    font-size: 12px;
    color: #95a0c8;
}

body.mbp-house .mbp-clan-modal-foot{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 16px 16px;
}

body.mbp-house .mbp-clan-modal-toggle:checked ~ .mbp-clan-modal-backdrop{
    display: block;
}

body.mbp-house .mbp-clan-modal-toggle:checked ~ .mbp-clan-modal{
    display: block;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1180px){
    body.mbp-house .mbp-house-top{
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 34px;
    }

    body.mbp-house .mbp-house-card .mbp-house-logo{
        min-height: auto;
    }

    body.mbp-house .mbp-house-members .grid > .mbp-member-row{
        max-width: 100%;
    }
}

@media (max-width: 760px){
    body.mbp-house .mbp-leader-row,
    body.mbp-house .mbp-member-row{
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    body.mbp-house .mbp-leader-badge,
    body.mbp-house .mbp-member-badge{
        align-self: flex-start;
    }

    body.mbp-house .mbp-house-detail-row{
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    body.mbp-house .mbp-house-detail-value{
        text-align: left;
    }

    body.mbp-house .mbp-clan-desc-head{
        align-items: flex-start;
    }

    body.mbp-house .mbp-clan-modal{
        width: min(94vw, 700px);
    }

    body.mbp-house .mbp-clan-modal-foot{
        flex-direction: column;
        align-items: stretch;
    }

    body.mbp-house .mbp-clan-modal-foot .btn{
        width: 100%;
        justify-content: center;
    }
}