/* ==========================================================================
   Login Showcase — right panel of the guest auth pages.
   Target path: public/new-adminvendors/css/login-showcase.css
   Loaded AFTER new_auths.css by the auth layouts. Everything is scoped to .ls
   so nothing else on the auth pages changes. Logical properties only: mirrors in RTL.
   ========================================================================== */
.ls {
    --ls-radius: 14px;
    --ls-dot: #C9D6DE;
    --ls-dot-on: #E45B48;
    --ls-cta-bg: #E45B48;
    --ls-cta-bg-hover: #cf4a38;
    --ls-cta-fg: #fff;
    --ls-focus: #03A1AA;
    --ls-w: 16;                     /* media ratio parts (unitless); images override inline from the stored width/height, videos keep 16/9 until the browser knows better */
    --ls-h: 9;
    --ls-max-h: 78vh;               /* tallest the stage may get (dvh below where supported: old Safari <15.4 would drop the whole width rule) */
    width: 100%;
    min-width: 0;                   /* a flex/grid parent must be able to shrink the showcase (390px reset page: legacy columns stay side by side) */
    max-width: min(960px, 100%);    /* the stage uses the right panel (previously capped at the 579px legacy box) */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    font-family: 'Mulish', 'Poppins', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}

@supports (height: 1dvh) { .ls { --ls-max-h: 78dvh; } }

.ls__track { position: relative; width: 100%; min-width: 0; }
.ls img, .ls video { max-width: 100%; }

.ls__slide { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ls__slide[hidden] { display: none !important; }

.ls__frame {
    position: relative;
    /* Stage: as wide as the panel allows, never taller than --ls-max-h, always the media's own ratio => the whole item is visible. */
    width: min(100%, calc(var(--ls-max-h) * var(--ls-w) / var(--ls-h)));
    max-width: 100%;
    aspect-ratio: var(--ls-w) / var(--ls-h);
    isolation: isolate;
    border-radius: var(--ls-radius);
    overflow: hidden;
    background: linear-gradient(180deg, #ECF5FE 0%, rgba(205, 236, 238, 0.3) 100%);
    box-shadow: 0 10px 30px rgba(0, 30, 50, .10);
}
/* Soft blurred, dimmed copy of the image behind it: letterbox bars (video, ratio drift) look intentional. Decorative, same URL = browser cache. */
.ls__frame::before {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: -1;
    background: var(--ls-bg, none) center / cover no-repeat;
    filter: blur(22px) brightness(.8);
    pointer-events: none;
}
.ls__slide[data-type="video"] .ls__frame { background: #0b1620; }

.ls__media { position: absolute; inset: 0; display: block; }
a.ls__media { cursor: pointer; }
.ls__media img,
.ls__media video {
    width: 100%;
    height: 100%;
    object-fit: contain;            /* never crop: 100% of the banner/video is visible */
    display: block;
}

.ls__media:focus-visible,
.ls__cta:focus-visible,
.ls__dot:focus-visible,
.ls__rotate:focus-visible,
.ls__sound:focus-visible,
.ls__play:focus-visible,
.ls__arrow:focus-visible {
    outline: 2px solid var(--ls-focus);
    outline-offset: 3px;
}
a.ls__media:focus-visible { outline-offset: -3px; }

/* Sound toggle on videos: sibling of the link (never nested in it) */
.ls__sound {
    position: absolute;
    inset-block-end: 10px;
    inset-inline-end: 10px;
    z-index: 1;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}
.ls__sound svg { width: 18px; height: 18px; }
.ls__sound .ls__icon-on { display: none; }
.ls__sound[aria-pressed="true"] .ls__icon-on { display: block; }
.ls__sound[aria-pressed="true"] .ls__icon-off { display: none; }

/* Big centered play button on every video slide until it plays (videos never autoplay) */
.ls__play {
    position: absolute;
    inset: 0;
    margin: auto;
    z-index: 1;
    width: 88px;
    height: 88px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: rgba(11, 22, 32, .72);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease;
}
.ls__play[hidden] { display: none; }
.ls__play:hover { background: rgba(228, 91, 72, .92); transform: scale(1.06); }
.ls__play::after {
    content: "";
    border-style: solid;
    border-width: 18px 0 18px 30px;
    border-color: transparent transparent transparent #fff;
    margin-inline-start: 8px;
}
/* Media symbols are not mirrored in RTL: the play triangle always points right. */
[dir="rtl"] .ls__play::after { margin-inline-start: 0; margin-inline-end: 8px; }
.ls__slide[data-type="video"] .ls__media { cursor: pointer; }

/* Previous / next arrows on the stage edges, vertically centred; inline-start/end so prev sits on the start side in RTL too */
.ls__arrow {
    position: absolute;
    inset-block-start: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: rgba(11, 22, 32, .72);
    color: #fff;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    transition: background-color .15s ease;
}
.ls__arrow:hover { background: rgba(11, 22, 32, .92); }
.ls__arrow--prev { inset-inline-start: 10px; }
.ls__arrow--next { inset-inline-end: 10px; }
.ls__arrow svg { width: 24px; height: 24px; }
[dir="rtl"] .ls__arrow svg { transform: scaleX(-1); }

.ls__cta {
    display: inline-block;
    text-decoration: none;
    background: var(--ls-cta-bg);
    color: var(--ls-cta-fg);
    padding: 10px 25px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.3;
    transition: background-color .15s ease;
}
.ls__cta:hover { background: var(--ls-cta-bg-hover); color: var(--ls-cta-fg); }

/* Dots sit on a dark translucent pill so they stay visible on any picture */
.ls__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(11, 22, 32, .68);
}
.ls__dots[hidden] { display: none; }
.ls__dot {
    width: 14px;
    height: 14px;
    border-radius: 14px;
    border: 0;
    padding: 0;
    background: #fff;
    opacity: .75;
    cursor: pointer;
    transition: width .2s ease, background-color .2s ease, opacity .2s ease;
}
.ls__dot[aria-current="true"] { width: 32px; background: var(--ls-dot-on); opacity: 1; }

/* Rotation switch (WCAG 2.2.2): 44px target inside the dots pill; pause icon while rotating, play icon while paused */
.ls__rotate {
    width: 44px;
    height: 44px;
    margin-block: -9px;
    margin-inline-end: 2px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
}
.ls__rotate:hover { background: rgba(255, 255, 255, .16); }
.ls__rotate svg { width: 20px; height: 20px; }
.ls__rotate .ls__icon-resume { display: none; }
.ls__rotate[aria-pressed="true"] .ls__icon-resume { display: block; }
.ls__rotate[aria-pressed="true"] .ls__icon-pause { display: none; }

/* The right panel holds the showcase without the legacy box padding */
.right-panel:has(.ls) { padding: 48px; min-width: 0; box-sizing: border-box; overflow-x: clip; }

@media (max-width: 768px) {
    .ls { max-width: 100%; }
    .right-panel:has(.ls) { padding: 24px 20px 32px; }
    /* Pages whose own CSS keeps the two columns side by side on phones (forgot/reset password: left column 440px min-content) would give the showcase a 0px column: stack them. */
    .container-auth:has(.ls) { flex-direction: column; }
    .container-auth:has(.ls) > .left-panel,
    .container-auth:has(.ls) > .right-panel { width: 100%; max-width: 100%; min-width: 0; flex: 0 0 auto; box-sizing: border-box; }
}

@media (prefers-reduced-motion: reduce) {
    .ls__dot, .ls__cta, .ls__arrow, .ls__play, .ls__rotate { transition: none; }
}
