/* =========================================================
   SHADOW · ELEVATION PREVIEW (hero)
   assets/css/pages/shadow-builder/preview/elevation-preview.css
   =========================================================
   The depth ladder. Card colours + the real elevation shadows are set
   inline by elevation-preview.js (var(--sh-elev-*) tokens via
   ShadowPreviewUtils). This file owns the SPATIAL feel: an atmospheric
   canvas + a per-level depth progression driven entirely by --lift
   (the level 0–5, set inline on each card). No faked shadows.
   ========================================================= */

/* Atmospheric canvas — a soft light pool from top-centre plus a faint floor
   fade, so the floating cards read against depth instead of a flat fill.
   Uses the themed preview-surface vars; no new colours. */
.sh-elev {
    background:
        radial-gradient(130% 80% at 50% -12%, var(--sh-surface-panel, #ffffff), transparent 60%),
        linear-gradient(to bottom, transparent 66%, rgba(15, 23, 42, 0.05)),
        var(--sh-surface-bg, #eef2f7);
}

.sh-elev-ladder {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Depth progression — driven by --lift (0–5). Higher levels float further up,
   scale a hair larger, and gain breathing room, so 1/2/3 separate clearly even
   where their token shadows sit close together. */
.sh-elev-card {
    transform: translateY(calc(var(--lift, 0) * -3px)) scale(calc(1 + var(--lift, 0) * 0.007));
    transform-origin: center;
    margin-top: calc(var(--lift, 0) * 2px);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    will-change: box-shadow, transform;
}

.sh-elev-card:hover {
    transform: translateY(calc(var(--lift, 0) * -3px - 3px)) scale(calc(1 + var(--lift, 0) * 0.007));
}

/* Ground sits flat on the surface — no lift, no scale, no extra space. */
.sh-elev-card--flat,
.sh-elev-card--flat:hover {
    transform: none;
    margin-top: 0;
}

/* Pinnacle — clearly the highest point: extra gap before it and the strongest
   float (its shadow is already the 2xl token). */
.sh-elev-row[data-level="5"] {
    margin-top: 12px;
}

.sh-elev-row[data-level="5"] .sh-elev-card {
    transform: translateY(-20px) scale(1.045);
}

.sh-elev-row[data-level="5"] .sh-elev-card:hover {
    transform: translateY(-24px) scale(1.045);
}

.sh-elev-badge {
    transition: background 0.18s ease, color 0.18s ease;
}

.sh-elev-value {
    opacity: 0.9;
}


/* =========================================================
   MOBILE — narrower column; softer lift (no scale → no overflow)
   ========================================================= */

.sh-preview-area--mobile .sh-elev,
.sh-preview-area--mobile .sh-elev-ladder {
    max-width: 100%;
}

.sh-preview-area--mobile .sh-elev-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transform: translateY(calc(var(--lift, 0) * -2px));
}

.sh-preview-area--mobile .sh-elev-row[data-level="5"] .sh-elev-card {
    transform: translateY(-12px);
}

.sh-preview-area--mobile .sh-elev-value {
    max-width: 100%;
    text-align: left;
}
