/* =========================================================
   HOUSES — page-scoped CSS
   Scope: body.mbp-houses
   Style:
   - compatto tipo ranking
   - desktop first
   - tabella vera, non lista verticale
   - font più leggibili
   - wrap controllato solo dove serve
========================================================= */

body.mbp-houses{
    --max: 1280px;
}

body.mbp-houses .wrap{
    max-width: var(--max);
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */

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

body.mbp-houses .hero h1{
    margin-bottom:12px;
}

body.mbp-houses .hero p{
    max-width:700px;
    margin:0 auto;
    color:rgba(255,255,255,.78);
}

body.mbp-houses .panel > .inner > .home-card-title{
    text-align:center;
    margin-bottom:22px;
}

/* ---------------------------------------------------------
   Filters
--------------------------------------------------------- */

body.mbp-houses .mbp-houses-filters{
    margin: 0 auto 24px auto;
}

body.mbp-houses .mbp-houses-filters-row{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px;
    flex-wrap: nowrap;
}

body.mbp-houses .mbp-houses-filterblock-left{
    flex: 1 1 auto;
    min-width: 0;
}

body.mbp-houses .mbp-houses-filterblock-right{
    flex: 0 0 auto;
    display:flex;
    align-items:flex-end;
    justify-content:flex-end;
}

body.mbp-houses .mbp-filter-label{
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
    opacity:.85;
    margin:0 0 6px 0;
}

body.mbp-houses .input{
    width:100%;
    padding:10px 12px;
    border-radius:12px;
    border:1px solid var(--border);
    background:rgba(255,255,255,.03);
    color:var(--text);
    outline:none;
}

body.mbp-houses .input:focus{
    border-color:rgba(155,123,255,.55);
    box-shadow:0 0 0 2px rgba(155,123,255,.20);
}

body.mbp-houses .mbp-houses-filterblock-actions{
    display:flex;
    align-items:center;
    gap:10px;
    white-space:nowrap;
}

/* ---------------------------------------------------------
   Table wrapper
--------------------------------------------------------- */

body.mbp-houses .mbp-houses-tablewrap{
    margin:0 auto;
    overflow-x:visible;
    padding-top:4px;
    padding-bottom:22px;
}

body.mbp-houses .mbp-houses-tablewrap-wide{
    max-width:100%;
}

@media (max-width: 1180px){
    body.mbp-houses .mbp-houses-tablewrap{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }
}

/* ---------------------------------------------------------
   Table core
--------------------------------------------------------- */

body.mbp-houses .mbp-houses-table{
    width:100%;
    min-width:1160px;
    table-layout:fixed;
    border-collapse:collapse;
    margin-bottom:0;
}

/* riequilibrio colonne per dare più aria al bottone View */
body.mbp-houses .mbp-houses-table colgroup col:nth-child(1){ width: 6%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(2){ width: 18%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(3){ width: 9%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(4){ width: 9%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(5){ width: 14%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(6){ width: 9%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(7){ width: 9%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(8){ width: 11%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(9){ width: 4%; }
body.mbp-houses .mbp-houses-table colgroup col:nth-child(10){ width: 11%; }

body.mbp-houses .mbp-houses-table thead th{
    text-align:left;
    vertical-align:middle;
    padding:10px 10px 12px 10px;
    font-family:var(--font-head);
    font-size:11px;
    letter-spacing:.14em;
    text-transform:uppercase;
    color:rgba(255,255,255,.78);
    opacity:.88;
    white-space:nowrap;
}

body.mbp-houses .mbp-houses-table tbody td{
    padding:9px 10px;
    font-family:var(--font-body);
    font-size:14px;
    line-height:1.3;
    vertical-align:top;
    border-top:1px solid rgba(255,255,255,.05);
}

/* celle centrali stabili */
body.mbp-houses .mbp-houses-table th.mbp-col-order,
body.mbp-houses .mbp-houses-table td.mbp-col-order,
body.mbp-houses .mbp-houses-table th.mbp-col-members,
body.mbp-houses .mbp-houses-table td.mbp-col-members,
body.mbp-houses .mbp-houses-table th.mbp-col-view,
body.mbp-houses .mbp-houses-table td.mbp-col-view{
    text-align:center;
    vertical-align:middle;
    white-space:nowrap;
}

body.mbp-houses .mbp-houses-table th.mbp-col-type,
body.mbp-houses .mbp-houses-table td.mbp-col-type,
body.mbp-houses .mbp-houses-table th.mbp-col-species,
body.mbp-houses .mbp-houses-table td.mbp-col-species{
    white-space:nowrap;
    vertical-align:middle;
}

/* ordine */
body.mbp-houses .mbp-order-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:26px;
    height:26px;
    border-radius:999px;
    border:1px solid rgba(200,170,90,.55);
    background:rgba(200,170,90,.14);
    font-size:12px;
    font-weight:700;
}

/* testi lunghi: SOLO alcune colonne */
body.mbp-houses .mbp-houses-table td.mbp-col-house,
body.mbp-houses .mbp-houses-table td.mbp-col-owner,
body.mbp-houses .mbp-houses-table td.mbp-col-officer1,
body.mbp-houses .mbp-houses-table td.mbp-col-officer2,
body.mbp-houses .mbp-houses-table td.mbp-col-clan{
    white-space:normal;
    overflow-wrap:break-word;
    word-break:normal;
    text-align:left;
}

/* contenuto multilinea davvero ancorato a sinistra */
body.mbp-houses .mbp-houses-table td.mbp-col-house > *,
body.mbp-houses .mbp-houses-table td.mbp-col-owner > *,
body.mbp-houses .mbp-houses-table td.mbp-col-officer1 > *,
body.mbp-houses .mbp-houses-table td.mbp-col-officer2 > *,
body.mbp-houses .mbp-houses-table td.mbp-col-clan > *{
    display:block;
    width:100%;
    text-align:left;
}

/* house e owner leggermente più forti */
body.mbp-houses .mbp-houses-table td.mbp-col-house,
body.mbp-houses .mbp-houses-table td.mbp-col-owner{
    font-size:15px;
    line-height:1.32;
}

body.mbp-houses .mbp-houses-table td.mbp-col-officer1,
body.mbp-houses .mbp-houses-table td.mbp-col-officer2,
body.mbp-houses .mbp-houses-table td.mbp-col-clan{
    font-size:13px;
    line-height:1.28;
}

/* link coerenti e compatti */
body.mbp-houses .mbp-houses-table td.mbp-col-house a,
body.mbp-houses .mbp-houses-table td.mbp-col-owner a,
body.mbp-houses .mbp-houses-table td.mbp-col-officer1 a,
body.mbp-houses .mbp-houses-table td.mbp-col-officer2 a,
body.mbp-houses .mbp-houses-table td.mbp-col-clan a{
    display:block;
    width:100%;
    text-align:left;
    white-space:normal;
    overflow-wrap:break-word;
    word-break:normal;
    text-decoration:none;
    line-height:1.3;
}

/* owner gold */
body.mbp-houses .mbp-owner-gold{
    display:block;
    width:100%;
    text-align:left;
    white-space:normal;
    overflow-wrap:break-word;
    word-break:normal;
}

/* bottone view */
body.mbp-houses .mbp-houses-table td.mbp-col-view{
    padding-left: 8px;
    padding-right: 8px;
}

body.mbp-houses .mbp-houses-table .btn.btn-sm{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:78px;
    min-width:78px;
    max-width:78px;
    height:32px;
    padding:0 10px;
    font-size:12px;
    line-height:1;
    white-space:nowrap;
    box-sizing:border-box;
}

/* specie/tipo */
body.mbp-houses .mbp-species,
body.mbp-houses .mbp-type{
    font-weight:600;
    letter-spacing:.02em;
    white-space:nowrap;
}

/* results + pagination */
body.mbp-houses .mbp-houses-resultsline{
    margin-top:16px;
    margin-bottom:14px;
    text-align:center;
    font-size:14px;
    line-height:1.4;
    color:rgba(255,255,255,.82);
}

body.mbp-houses .mbp-houses-pagination{
    margin-top:8px;
    padding-top:4px;
    display:flex;
    justify-content:center;
    align-items:center;
}

body.mbp-houses .mbp-houses-pagination-inner{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
    padding:10px 14px;
    border-radius:16px;
    background:rgba(255,255,255,.02);
    border:1px solid rgba(155,123,255,.16);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.015);
}

body.mbp-houses .mbp-houses-pagination .btn.btn-sm{
    min-width:44px;
    padding:7px 12px;
    font-size:12px;
    line-height:1;
}

body.mbp-houses .mbp-houses-pagination .btn.active{
    pointer-events:none;
    background:rgba(155,123,255,.18);
    border-color:rgba(155,123,255,.42);
    color:#fff;
    box-shadow:0 0 0 1px rgba(155,123,255,.10), 0 0 18px rgba(155,123,255,.10);
}

body.mbp-houses .mbp-houses-pagination .btn.disabled{
    opacity:.45;
    pointer-events:none;
    filter:saturate(.7);
}

body.mbp-houses .mbp-houses-empty{
    text-align:center;
    padding:14px 0 8px;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */

@media (max-width: 980px){
    body.mbp-houses .mbp-houses-filters-row{
        flex-wrap:wrap;
    }

    body.mbp-houses .mbp-houses-filterblock-left{
        flex:1 1 100%;
        min-width:0;
        max-width:100%;
    }

    body.mbp-houses .mbp-houses-filterblock-right{
        flex:1 1 100%;
        justify-content:flex-start;
        flex-wrap:wrap;
    }

    body.mbp-houses .mbp-houses-table{
        min-width:1080px;
    }

    body.mbp-houses .mbp-houses-table thead th{
        font-size:10px;
    }

    body.mbp-houses .mbp-houses-table tbody td{
        font-size:13px;
    }

    body.mbp-houses .mbp-houses-table td.mbp-col-house,
    body.mbp-houses .mbp-houses-table td.mbp-col-owner{
        font-size:14px;
    }

    body.mbp-houses .mbp-houses-table td.mbp-col-officer1,
    body.mbp-houses .mbp-houses-table td.mbp-col-officer2,
    body.mbp-houses .mbp-houses-table td.mbp-col-clan{
        font-size:12px;
    }

    body.mbp-houses .mbp-houses-resultsline{
        margin-top:14px;
        margin-bottom:12px;
        font-size:13px;
    }

    body.mbp-houses .mbp-houses-pagination-inner{
        width:100%;
        gap:8px;
        padding:10px;
    }
}

/* ---------------------------------------------------------
   Colors
--------------------------------------------------------- */

body.mbp-houses .mbp-owner-gold{
    color:#b8932f;
    font-weight:600;
    text-shadow:0 0 6px rgba(184,147,47,.22);
}

body.mbp-houses .mbp-species-vampire,
body.mbp-houses .mbp-type-house{
    color:#b02a22;
    text-shadow:0 0 10px rgba(176,42,34,.22);
}

body.mbp-houses .mbp-species-lycan,
body.mbp-houses .mbp-type-pack{
    color:#f2c75a;
    text-shadow:0 0 12px rgba(242,199,90,.30);
}

body.mbp-houses .mbp-species-witch,
body.mbp-houses .mbp-type-coven{
    color:#8f6cff;
    text-shadow:0 0 12px rgba(143,108,255,.22);
}

body.mbp-houses .mbp-species-unknown,
body.mbp-houses .mbp-type-unknown{
    color:rgba(255,255,255,.62);
}

body.mbp-houses .mbp-houses-table td:nth-child(6){
    color:#7DF9FF;
}

body.mbp-houses .mbp-houses-table td:nth-child(7){
    color:#C67CFF;
}

/* ---------------------------------------------------------
   Houses index — filters/table visual alignment
--------------------------------------------------------- */

body.mbp-houses .panel{
    overflow:hidden;
}

body.mbp-houses .panel .inner{
    position:relative;
    z-index:1;
}

body.mbp-houses .home-search-card{
    margin-top:2px;
    border:1px solid rgba(124,92,255,.14);
    background:
        linear-gradient(180deg, rgba(10,12,19,.74), rgba(7,9,15,.64));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03),
        0 18px 40px rgba(0,0,0,.22);
}

body.mbp-houses .houses-toolbar{
    align-items:end;
    gap:14px;
}

body.mbp-houses .houses-toolbar .field{
    gap:7px;
}

body.mbp-houses .houses-toolbar label{
    font-size:11px;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:rgba(255,255,255,.74);
}

body.mbp-houses .houses-toolbar input,
body.mbp-houses .houses-toolbar select{
    min-height:40px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(8,10,16,.72);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

body.mbp-houses .houses-toolbar input:focus,
body.mbp-houses .houses-toolbar select:focus{
    border-color:rgba(124,92,255,.45);
    box-shadow:
        0 0 0 3px rgba(124,92,255,.12),
        inset 0 1px 0 rgba(255,255,255,.04);
}

body.mbp-houses .houses-toolbar .actions{
    gap:10px;
}

body.mbp-houses .houses-toolbar .actions .btn{
    min-height:40px;
    padding:0 16px;
}

body.mbp-houses .houses-table-card{
    margin-top:18px;
    border:1px solid rgba(124,92,255,.14);
    background:
        linear-gradient(180deg, rgba(9,11,18,.80), rgba(7,9,15,.72));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03),
        0 20px 46px rgba(0,0,0,.26);
}

body.mbp-houses .table-shell{
    border-radius:16px;
    overflow:hidden;
    background:rgba(5,7,12,.18);
}

body.mbp-houses table{
    border-collapse:separate;
    border-spacing:0;
}

body.mbp-houses thead th{
    position:sticky;
    top:0;
    z-index:1;
    background:rgba(12,14,22,.92);
    backdrop-filter:blur(8px);
}

body.mbp-houses tbody tr{
    transition:background .14s ease;
}

body.mbp-houses tbody tr:hover{
    background:rgba(255,255,255,.025);
}

body.mbp-houses tbody td{
    background:transparent;
}

body.mbp-houses .table-foot{
    padding-top:14px;
}

body.mbp-houses .table-foot .pagination{
    justify-content:center;
}

/* ---------------------------------------------------------
   Houses index — hero spacing + members header readability
--------------------------------------------------------- */

body.mbp-houses .hero{
    padding-bottom: 10px;
}

body.mbp-houses .home-search-card{
    margin-top: 22px;
}

body.mbp-houses .mbp-houses-table th.mbp-col-members,
body.mbp-houses .mbp-houses-table td.mbp-col-members{
    min-width: 78px;
    text-align: center;
}

body.mbp-houses .mbp-houses-table th.mbp-col-members{
    letter-spacing: .06em;
    color: rgba(255,255,255,.92);
    text-shadow: 0 0 1px rgba(255,255,255,.08);
}

/* ---------------------------------------------------------
   Houses Hero — GOLD EPIC TITLE STYLE
--------------------------------------------------------- */

body.mbp-houses .hero h1{
    font-size: 34px;
    letter-spacing: .08em;
    font-weight: 600;

    background: linear-gradient(180deg,#ffe8a3 0%,#d4a63a 60%,#9b6c10 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow:
        0 0 8px rgba(212,166,58,.35),
        0 0 18px rgba(212,166,58,.15);

    margin-bottom: 6px;
}

body.mbp-houses .hero p{
    font-size: 14px;
    color: rgba(255,255,255,.68);
    letter-spacing: .04em;
}