/* ==========================================================================
   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: 86px;
    position: relative !important;
    display: grid !important;
    grid-template-columns: 80px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    row-gap: 6px !important;
    align-items: start !important;
    width: 244px !important;
    max-width: calc(100vw - 24px) !important;
    padding: calc(var(--hvs-fascia) - 28px) 10px 11px !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 18px !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 -32px top -56px / 180px auto no-repeat,
        linear-gradient(180deg, #6FC3F0 0%, #B9E4F7 56px, #1A2140 56px) !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: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    z-index: 3;
    background: var(--hv-icon-x) center / 11px 11px 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 / 11px 11px 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: 80px !important;
    height: 88px !important;
    margin: 0 !important;
    border-radius: 14px !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: 4px;
    transform: scale(.92);
    transform-origin: bottom center;
}
.octane-infostand.profile-card-background .background-edit-icon {
    position: absolute !important;
    left: 68px !important;
    top: calc(var(--hvs-fascia) - 34px) !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: 30px !important;
    gap: 5px !important;
}
.octane-infostand.profile-card-background .octane-infostand__home {
    flex: 0 0 auto;
    width: 19px !important;
    height: 19px !important;
    border-radius: 6px !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: 16px !important;
    font-weight: 800 !important;
    line-height: 20px !important;
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* nome: niente riquadro di sfondo, né al passaggio, né al clic, né quando è selezionato */
.octane-infostand.profile-card-background .octane-infostand__profile-link,
.octane-infostand.profile-card-background .octane-infostand__profile-link:is(:hover, :focus, :focus-visible, :active),
.octane-infostand.profile-card-background .octane-infostand__profile-link span,
.octane-infostand.profile-card-background .octane-infostand__home:is(:focus, :focus-visible, :active) {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border: 0 !important;
    padding: 0 !important;
}
.octane-infostand.profile-card-background .octane-infostand__home:is(:focus, :focus-visible, :active) {
    background: rgba(255, 255, 255, .1) !important;
}
.octane-infostand.profile-card-background .octane-infostand__profile-link:hover span span {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.octane-infostand.profile-card-background .octane-infostand__profile-link {
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
}

.hv-scheda-chip {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 19px;
}
.hv-scheda-chip span,
.hv-scheda-chip a {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10px;
    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 6px;
    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: righe da 3 (massimo 5, limite dell'emulatore), quelli in più centrati sotto */
.octane-infostand.profile-card-background .octane-infostand__badges {
    grid-column: 1 / -1 !important;
    order: 4;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: auto !important;
    gap: 6px !important;
    margin-top: 4px !important;
    padding: 8px !important;
    border-radius: 13px !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 {
    flex: 0 0 calc((100% - 12px) / 3) !important;
    width: auto !important;
    height: 48px !important;
    border-radius: 10px !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;
}
/* solo i distintivi indossati: niente slot vuoti né «+»; senza distintivi il pannello sparisce */
.octane-infostand.profile-card-background .octane-infostand__badges > div:not(:has([style*="background-image"], img)) {
    display: none !important;
}
.octane-infostand.profile-card-background .octane-infostand__badges:not(:has([style*="background-image"], img)) {
    display: none !important;
}
/* alone del colore del distintivo (il client lo calcola in --badge-glow) */
.octane-infostand.profile-card-background .octane-infostand__badges [style*="--badge-glow"] {
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--badge-glow) 55%, transparent));
}
.octane-infostand.profile-card-background .octane-infostand__badge-slot-plus {
    font-size: 18px !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: 32px !important;
    margin: 0 !important;
    padding: 6px 11px !important;
    border-radius: 10px !important;
    background: rgba(0, 0, 0, .22) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 16px !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: 10px; 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: 12px !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: 12px;
}
.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;
}

/* schermi meno alti: tutta la scheda si riduce nelle stesse proporzioni */
@media (max-height: 820px) { .octane-infostand.profile-card-background { zoom: .9; } }
@media (max-height: 700px) { .octane-infostand.profile-card-background { zoom: .8; } }
@media (max-height: 600px) { .octane-infostand.profile-card-background { zoom: .72; } }

/* 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; }
}
