/* Avatar quadrato stile Steam Points Shop */
.lh-avatar-wrap.lh-avatar-square,
.lh-preview-avatar-wrap.lh-avatar-square {
    --lh-avatar-deco-scale: 1;
    /* Compensa il padding trasparente negli asset Steam (cornici + avatar animati) */
    --lh-steam-media-fill: 1.22;
    --lh-steam-frame-fill: 1.22;
    /* Il contenuto riempie il wrap; il bordo bianco è box-shadow, non padding */
    padding: 0;
}

.lh-avatar-wrap.lh-avatar-square .lh-avatar-inner,
.lh-preview-avatar-wrap.lh-avatar-square .lh-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 0.35rem;
    overflow: hidden;
}

.lh-avatar-wrap.lh-avatar-square .lh-avatar-photo,
.lh-preview-avatar-wrap.lh-avatar-square .lh-avatar-photo,
.lh-avatar-wrap.lh-avatar-square .lh-avatar-initials,
.lh-preview-avatar-wrap.lh-avatar-square .lh-avatar-initials {
    border-radius: 0.35rem;
}

.lh-avatar-wrap.lh-avatar-square::before,
.lh-preview-avatar-wrap.lh-avatar-square::before {
    display: none !important;
}

.lh-avatar-wrap.lh-avatar-square .lh-avatar-decoration.lh-steam-frame,
.lh-preview-avatar-wrap.lh-avatar-square .lh-avatar-decoration.lh-steam-frame,
.lh-avatar-wrap.lh-avatar-square .lh-deco-mini-steam-frame,
.lh-preview-avatar-wrap.lh-avatar-square .lh-deco-mini-steam-frame {
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center center;
    transform: translate(-50%, -50%) scale(var(--lh-steam-frame-fill, 1.22));
    transform-origin: center center;
    z-index: 7;
}

/* Cornice Steam: bordo bianco profilo più sottile (2px invece di 3px) */
.lh-avatar-wrap.lh-avatar-square:has(.lh-steam-frame:not(.hidden)),
.lh-preview-avatar-wrap.lh-avatar-square:has(.lh-steam-frame:not(.hidden)) {
    --lh-avatar-ring: 2px;
}

.lh-profile-identity--with-banner .lh-avatar-wrap.lh-avatar-square:has(.lh-steam-frame) .lh-avatar-inner,
.lh-preview-shell .lh-profile-identity--with-banner .lh-avatar-wrap.lh-avatar-square:has(.lh-steam-frame:not(.hidden)) .lh-avatar-inner {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 4px 18px rgba(0, 0, 0, 0.35);
}

.lh-steam-avatar-media,
.lh-avatar-inner .lh-steam-avatar-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: inherit;
    /* Gli asset Steam hanno spesso margine trasparente nel PNG/GIF */
    transform: scale(var(--lh-steam-media-fill, 1.22));
    transform-origin: center center;
}

.lh-steam-animated-avatar .lh-avatar-inner {
    background: #0a0a0a;
}

.lh-steam-animated-avatar .lh-avatar-photo,
.lh-steam-animated-avatar .lh-avatar-initials,
.lh-preview-avatar-wrap.lh-steam-animated-avatar .lh-avatar-photo,
.lh-preview-avatar-wrap.lh-steam-animated-avatar .lh-avatar-initials {
    display: none !important;
}

.lh-steam-animated-avatar #lh-preview-steam-frame.hidden,
.lh-steam-animated-avatar .lh-avatar-decoration.lh-steam-frame.hidden {
    display: none !important;
}

.lh-deco-tile-preview.lh-steam-tile-preview--square,
.lh-deco-tile[data-deco-square="1"] .lh-deco-tile-preview {
    border-radius: 0.35rem;
}

/* Anteprime catalogo Steam — video/GIF su sfondo chiaro (evita tile nere) */
.lh-steam-tile-media,
.lh-deco-tile-preview .lh-steam-tile-media,
.lh-collectible-tile-thumb .lh-steam-tile-media,
.lh-collectible-preview .lh-steam-tile-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.lh-deco-tile-preview.lh-steam-tile-preview--square,
.lh-collectible-tile-thumb.lh-steam-tile-thumb--square,
.lh-steam-panel .lh-collectible-preview,
.lh-steam-panel .lh-collectible-tile-thumb {
    background:
        linear-gradient(145deg, #52525b 0%, #27272a 45%, #18181b 100%);
}

.lh-steam-panel .lh-collectible-preview {
    position: relative;
    overflow: hidden;
    min-height: 3.5rem;
}

.lh-steam-panel .lh-collectible-preview .lh-steam-tile-media {
    position: absolute;
    inset: 0;
}

.lh-steam-panel .lh-collectible-preview:not(:has(.lh-steam-tile-media)) {
    display: grid;
    place-items: center;
}

.lh-steam-tile-poster {
    z-index: 0;
}

.lh-deco-tile-preview video.lh-steam-tile-media,
.lh-collectible-tile-thumb video.lh-steam-tile-media,
.lh-collectible-preview video.lh-steam-tile-media {
    z-index: 1;
}

/* Anteprima cornici nel picker dashboard */
#lh-steam-deco-grid .lh-deco-tile[data-steam-slot="frame"] .lh-deco-tile-preview {
    background:
        linear-gradient(135deg, #27272a 0%, #0a0a0a 100%);
    overflow: hidden;
}

#lh-steam-deco-grid .lh-deco-tile[data-steam-slot="frame"] .lh-deco-tile-preview::before {
    content: '';
    position: absolute;
    inset: 22%;
    border-radius: 0.2rem;
    background: linear-gradient(145deg, #52525b, #27272a);
    z-index: 0;
}

#lh-steam-deco-grid .lh-deco-tile[data-steam-slot="frame"] .lh-deco-tile-preview img {
    transform: scale(var(--lh-steam-frame-fill, 1.22)) !important;
    object-fit: contain !important;
    z-index: 1;
}

#lh-steam-deco-grid .lh-deco-tile[data-steam-slot="animated"] .lh-deco-tile-preview img {
    transform: scale(var(--lh-steam-media-fill, 1.22)) !important;
    object-fit: cover !important;
}

.lh-collectible-tile-thumb.lh-steam-tile-thumb--square {
    border-radius: 0.35rem;
}

.lh-steam-panel .lh-collectible-preview {
    border-radius: 0.35rem;
}

/* Dashboard: sfondi pagina Steam — solo icona in testa, mai anteprima gigante */
body.lh-dash-page .lh-steam-panel--page-bg .lh-collectible-preview {
    width: 2.75rem;
    height: 2.75rem;
    min-height: 0;
    flex: 0 0 2.75rem;
}

body.lh-dash-page .lh-steam-panel--page-bg .lh-collectible-preview img,
body.lh-dash-page .lh-steam-panel--page-bg .lh-collectible-preview video {
    display: none !important;
}

body.lh-dash-page .lh-steam-panel .lh-collectible-tile-thumb,
body.lh-dash-page .lh-steam-panel .lh-collectible-preview {
    position: relative;
    overflow: hidden;
    contain: layout paint;
}

body.lh-dash-page .lh-steam-panel .lh-collectible-tile-thumb .lh-steam-tile-media,
body.lh-dash-page .lh-steam-panel .lh-collectible-preview .lh-steam-tile-media {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    transform: none !important;
}

body.lh-dash-page .lh-steam-panel--page-bg .lh-collectible-preview .lh-steam-tile-media {
    display: none !important;
}

/* Sfondo pagina Steam — SOLO profilo pubblico (body.lh-profile-wrap), mai altrove */
.lh-steam-page-bg,
.lh-preview-page-bg {
    display: none !important;
    pointer-events: none;
    overflow: hidden;
}

body.lh-profile-wrap > .lh-steam-page-bg {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 0;
}

body.lh-dash-page .lh-steam-page-bg,
body.lh-dash-page .lh-preview-page-bg,
body.lh-dash-page #lh-steam-page-bg,
body.lh-dash-page #lh-preview-page-bg {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.lh-dash-page .lh-acc-app > .lh-steam-page-bg,
body.lh-dash-page .lh-acc-main > .lh-steam-page-bg,
body.lh-dash-page .lh-acc-app > video[src*="steamstatic"],
body.lh-dash-page .lh-acc-main > video[src*="steamstatic"] {
    display: none !important;
}

.lh-steam-page-bg img,
.lh-steam-page-bg video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lh-steam-deco-grid {
    max-height: min(46vh, 420px);
}

body.lh-entry-locked .lh-steam-page-bg,
body.lh-entry-pending .lh-steam-page-bg {
    opacity: 0.35;
}
