/* ==========================================================================
   SCHEDA UTENTE IN STANZA (21/10/2026), ispirata alla scheda di bobbahotel.it.
   Fascia in alto (la «scheda» scelta dall'utente, altrimenti l'hotel), avatar in un riquadro che la sovrappone,
   nome con grado e ruolo (da havoo-scheda.js + API havoo.net/api/hv/scheda), distintivi in griglia, righe sotto.
   Vale solo per la scheda degli utenti (.profile-card-background), non per furni e animali.
   Per toglierla: togliere questo file e havoo-scheda.js da index.html.
   ========================================================================== */
.octane-infostand.profile-card-background {
    --hvs-fascia: 112px;
    position: relative !important;
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
    align-items: start !important;
    width: 296px !important;
    max-width: calc(100vw - 24px) !important;
    padding: calc(var(--hvs-fascia) - 34px) 12px 14px !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    background-color: #1A2140 !important;
    background-size: auto !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
    color: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
/* senza «scheda» scelta: cielo e palazzo dell'hotel */
.octane-infostand.profile-card-background:not([class*="card-background-"]) {
    background:
        url('/havoo/vista/reception_flathotel_backdrop_right.png') right -40px top -70px / 230px auto no-repeat,
        linear-gradient(180deg, #6FC3F0 0%, #B9E4F7 70px, #1A2140 70px) !important;
}
/* pannello scuro sotto la fascia */
.octane-infostand.profile-card-background::after {
    content: '';
    position: absolute;
    inset: var(--hvs-fascia) 0 0 0;
    background: linear-gradient(180deg, #1D2546 0%, #161C36 100%);
    border-top: 1px solid rgba(255, 255, 255, .1);
    pointer-events: none;
    z-index: 0;
}
.octane-infostand.profile-card-background > * {
    position: relative;
    z-index: 1;
}
.octane-infostand.profile-card-background > .infostand-border {
    position: absolute !important;
    z-index: 2;
    pointer-events: none;
}
.octane-infostand.profile-card-background .octane-infostand__rule {
    display: none !important;
}

/* chiudi: tondo scuro sulla fascia */
.octane-infostand.profile-card-background .octane-infostand__close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    z-index: 3;
    background: var(--hv-icon-x) center / 13px 13px no-repeat, rgba(10, 14, 34, .55) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.octane-infostand.profile-card-background .octane-infostand__close:hover {
    background: var(--hv-icon-x) center / 13px 13px no-repeat, rgba(10, 14, 34, .8) !important;
}

/* avatar nel riquadro che sovrappone la fascia */
.octane-infostand.profile-card-background .octane-infostand__figure-row {
    display: contents !important;
}
.octane-infostand.profile-card-background .octane-infostand__avatar-well {
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
    width: 104px !important;
    height: 112px !important;
    margin: 0 !important;
    border-radius: 18px !important;
    overflow: visible !important;
    background-color: #232A48 !important;
    background-size: 120% auto !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .08) !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    cursor: pointer;
}
.octane-infostand.profile-card-background .octane-infostand__avatar-well .avatar-image {
    left: 0 !important;
    margin-bottom: 6px;
    transform: scale(1.12);
    transform-origin: bottom center;
}
.octane-infostand.profile-card-background .background-edit-icon {
    position: absolute !important;
    left: 90px !important;
    top: calc(var(--hvs-fascia) - 40px) !important;
    z-index: 3;
}

/* nome, grado e ruolo accanto all'avatar */
.octane-infostand.profile-card-background .octane-infostand__header {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    min-height: 0 !important;
    margin-top: 40px !important;
    gap: 6px !important;
}
.octane-infostand.profile-card-background .octane-infostand__home {
    flex: 0 0 auto;
    width: 22px !important;
    height: 22px !important;
    border-radius: 7px !important;
    background: rgba(255, 255, 255, .1) !important;
    display: grid !important;
    place-items: center !important;
}
.octane-infostand.profile-card-background .octane-infostand__profile-link span,
.octane-infostand.profile-card-background .octane-infostand__profile-link span span {
    font-size: 19px !important;
    font-weight: 800 !important;
    line-height: 24px !important;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hv-scheda-chip {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 22px;
}
.hv-scheda-chip span,
.hv-scheda-chip a {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}
.hv-scheda-chip .grado {
    color: color-mix(in srgb, var(--c) 30%, #fff);
    background: color-mix(in srgb, var(--c) 22%, transparent);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 75%, transparent);
}
.hv-scheda-chip .ruolo {
    color: #fff;
    background: var(--c);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2);
}
.hv-scheda-chip a {
    padding: 0 8px;
    color: #A6A9B8;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
}
.hv-scheda-chip a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

/* distintivi indossati: griglia da 3 in un pannello */
.octane-infostand.profile-card-background .octane-infostand__badges {
    grid-column: 1 / -1 !important;
    order: 4;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: 62px !important;
    width: auto !important;
    gap: 8px !important;
    margin-top: 6px !important;
    padding: 10px !important;
    border-radius: 16px !important;
    background: rgba(0, 0, 0, .22) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.octane-infostand.profile-card-background .octane-infostand__badges > div {
    width: auto !important;
    height: 62px !important;
    border-radius: 12px !important;
    background-color: rgba(255, 255, 255, .05) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.octane-infostand.profile-card-background .octane-infostand__badges .octane-infostand__badge-slot {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    background-color: transparent !important;
}
.octane-infostand.profile-card-background .octane-infostand__badges > div:hover {
    background-color: rgba(255, 255, 255, .1) !important;
}
/* slot vuoti: si nascondono, tranne quelli col «+» sulla propria scheda */
.octane-infostand.profile-card-background .octane-infostand__badges > div:not(:has(img, [style*="background-image"], .octane-infostand__badge-slot-plus, .badge-image, [class*="badge"] [style])) {
    display: none !important;
}
.octane-infostand.profile-card-background .octane-infostand__badges:not(:has(img, [style*="background-image"], .octane-infostand__badge-slot-plus)) {
    display: none !important;
}
.octane-infostand.profile-card-background .octane-infostand__badge-slot-plus {
    font-size: 22px !important;
    color: rgba(255, 255, 255, .3) !important;
}

/* righe sotto: distintivi posseduti, motto, classifica, relazioni */
.hv-scheda-riga,
.octane-infostand.profile-card-background .octane-infostand__motto,
.octane-infostand.profile-card-background .octane-infostand__score {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    border-radius: 12px !important;
    background: rgba(0, 0, 0, .22) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 18px !important;
    text-align: left !important;
}
.hv-scheda-riga {
    order: 5;
    justify-content: space-between !important;
    border: 0;
    cursor: pointer;
}
.hv-scheda-riga span { color: #A6A9B8; }
.hv-scheda-riga b { margin-left: 6px; color: #fff; font-weight: 800; }
.hv-scheda-riga small { color: #7D8090; font-size: 11px; font-weight: 600; }
.hv-scheda-riga:hover { background: rgba(0, 0, 0, .32) !important; }
.octane-infostand.profile-card-background .octane-infostand__motto { order: 6; }
.octane-infostand.profile-card-background .octane-infostand__motto > div {
    font-size: 13px !important;
    font-style: italic;
    color: #D9DBE6 !important;
}
.octane-infostand.profile-card-background .octane-infostand__score { order: 7; }
/* il Punteggio resta nascosto (si tiene solo la classifica dei distintivi) */
.octane-infostand.profile-card-background .octane-infostand__score:has(+ .octane-infostand__rule + .octane-infostand__score) {
    display: none !important;
}
.octane-infostand.profile-card-background .octane-infostand__score:hover { background: rgba(0, 0, 0, .32) !important; }
/* relazioni e tag (cuore, sorriso...) */
.octane-infostand.profile-card-background > .flex.items-center {
    grid-column: 1 / -1 !important;
    order: 8;
    padding: 0 4px;
    font-size: 13px;
}
.octane-infostand.profile-card-background > .flex.items-center:first-of-type { margin-top: 2px; }
.octane-infostand.profile-card-background > .flex.items-center u { text-underline-offset: 3px; }
.octane-infostand.profile-card-background > :not(.octane-infostand__close):not(.octane-infostand__header):not(.octane-infostand__figure-row):not(.hv-scheda-chip):not(.infostand-border):not(.backgrounds-view-container) {
    grid-column: 1 / -1;
}
.octane-infostand.profile-card-background > .backgrounds-view-container {
    position: absolute !important;
}

/* entrata */
.octane-infostand.profile-card-background {
    animation: hvs-scheda-in .22s ease-out both;
}
@keyframes hvs-scheda-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .octane-infostand.profile-card-background { animation: none; }
}
