/* ============================================================================
   Sign-in carousel and layout - shared by every ACS sign-in page.

   Loaded AFTER login-sso.css, which is deliberately not edited: that file is a
   byte-identical copy in cs-finance and is also used by the parent and student
   pages. Everything here is opt-in through a class or data attribute, so a page
   that does not ask for it looks exactly as before.

   1. .login-art-left   - puts the artwork on the LEFT and the credentials on the
                          RIGHT (read left to right: picture first, then the form).
                          Desktop only. Below 1025px the page stacks as before, with
                          the form first, because it is what a phone user came for.
   2. .lc-slide         - the cross-fading artwork slides inside .login-art-media.
   3. .lc-nav / .lc-chip - the module chips and the pause button.
   4. .lc-fill          - the same idea for a full-bleed panel (Transport).

   The matching script is assets/js/login-carousel.js.
   ============================================================================ */

/* ---- 1. Side swap -------------------------------------------------------- */
@media (min-width: 1025px) {
    .login-container.login-art-left {
        flex-direction: row-reverse;
    }
}

/* ---- 2. Slides ----------------------------------------------------------- */
/* A stacking context of its own, so the slide z-indexes below can never leak out and
   change how the blobs, dots and headline are layered. */
.login-art-media {
    isolation: isolate;
}

/* Without the script none of these classes exist, so the first picture simply shows.
   The script adds .lc-slide to every slide, including the first one. */
.lc-slide {
    opacity: 0;
    z-index: 0;
    transition: opacity 900ms ease;
}

/* The picture on its way out stays fully opaque underneath the one fading in, so the
   panel never dips to the bare gradient half way through a change. */
.lc-slide.is-prev {
    opacity: 1;
    z-index: 1;
}

.lc-slide.is-active {
    opacity: 1;
    z-index: 2;
}

/* The headline and line of copy change with the slide. */
.login-panel-title,
.login-panel-subtitle {
    transition: opacity 220ms ease;
}

.lc-text-out {
    opacity: 0;
}

/* ---- A pinned slide with no picture: an icon card --------------------------- */
/* Drawn in place of the picture, so it takes the picture's place and curve (the clip path
   comes from the copied login-art classes). The script paints the panel's own gradient
   over it, so it reads as the panel's colour with the icon in front. The icon sits in the
   upper part, clear of the curve that cuts the lower corners. */
.lc-card,
.login-bg-wrapper .lc-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 16%;
    background-color: #0a2540;
}

.lc-card-icon {
    font-size: clamp(64px, 8vw, 118px);
    color: #ffffff;
    opacity: 0.95;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}

/* On the light homepage the card fills the stage frame with a deep blue gradient. */
.lc-stage-media > .lc-card {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding-bottom: 0;
    background-image: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%), linear-gradient(135deg, #0a2540 0%, #1d4ed8 100%);
}

/* ---- 3. Module chips and pause ------------------------------------------ */
.lc-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 18px;
    max-width: 440px;
}

.lc-chip {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 999px;
    padding: 5px 13px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.lc-chip:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* A fixed dark navy, not the school's brand colour: a very light brand colour would put
   pale text on a white pill. */
.lc-chip.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: #0a2540;
}

.lc-chip:focus-visible,
.lc-pause:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.lc-pause {
    appearance: none;
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.lc-pause:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ---- 4. Full-bleed panel (Transport) ------------------------------------- */
.lc-fill-root {
    isolation: isolate;
}

.lc-fill {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 0;
    transition: opacity 900ms ease;
}

.lc-fill.is-prev {
    opacity: 1;
    z-index: 1;
}

.lc-fill.is-active {
    opacity: 1;
    z-index: 2;
}

/* On its own in a corner, so it says what it does instead of showing only an icon. */
.lc-pause--float {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 5;
    width: auto;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(10, 37, 64, 0.55);
}

.lc-pause-text {
    margin-left: 7px;
    font-size: 12.5px;
    font-weight: 600;
}

/* The feature that matches the picture on show is picked out with a scale and an
   underline. The others stay at FULL strength: fading them put the text under the
   contrast the page needs against its blue overlay. */
.lc-on .lc-feature {
    transition: transform 300ms ease;
}

/* The text sits on a photo under a blue overlay: a soft shadow keeps it legible over the
   lighter parts of the picture. */
.lc-on .lc-feature span {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.lc-on .lc-feature.is-active {
    transform: scale(1.05);
}

.lc-on .lc-feature.is-active span {
    border-bottom: 2px solid #f3732a;
    padding-bottom: 2px;
}

/* ---- 5. Stage: a picture with a caption on a light page (the /login homepage) ---- */
.lc-stage-media {
    position: relative;
    isolation: isolate;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Every slide fills the frame, whatever shape its picture is. */
.lc-stage-media > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

/* The homepage's own .hero-img rule zooms the picture on hover and animates transform;
   inside the frame the slide must only ever cross-fade. */
.lc-stage-media > img.lc-slide {
    transition: opacity 900ms ease;
}

.lc-stage-media > img:hover {
    transform: none;
}

.lc-stage-caption {
    text-align: center;
    padding-top: 14px;
}

.lc-stage-title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    transition: opacity 220ms ease;
}

.lc-stage-text {
    margin: 0 auto 12px;
    max-width: 44ch;
    font-size: 0.92rem;
    color: #475569;
    transition: opacity 220ms ease;
}

/* The chips were drawn for a dark panel; on a light page they are dark on white. */
.lc-stage .lc-chip {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #334155;
}

.lc-stage .lc-chip:hover {
    background: #f1f5f9;
}

.lc-stage .lc-chip.is-active {
    border-color: #0a2540;
    background: #0a2540;
    color: #ffffff;
}

.lc-stage .lc-chip:focus-visible,
.lc-stage .lc-pause:focus-visible {
    outline-color: #0a2540;
}

/* Phones use only this stage, so its chips get a comfortable thumb-sized target. */
@media (max-width: 640px) {
    .lc-stage .lc-chip {
        padding: 9px 15px;
    }
}

.lc-stage .lc-pause {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #334155;
}

/* display:flex restates the default on purpose: it must beat the "hide the chips below
   1025px" rule further down, which is for the sign-in panels only. */
.lc-stage .lc-nav {
    display: flex;
    margin-bottom: 0;
}

/* The stage shows at every width, so its title and text may fade like the panel's. */
.lc-stage .lc-text-out {
    opacity: 0;
}

/* ---- Small screens and motion preferences -------------------------------- */
/* The picture is hidden below 1025px by login-sso.css, so there is nothing to steer. */
@media (max-width: 1024px) {
    .lc-nav,
    .lc-pause--float {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lc-slide,
    .lc-fill,
    .lc-chip,
    .lc-stage-title,
    .lc-stage-text,
    .login-panel-title,
    .login-panel-subtitle,
    .lc-on .lc-feature {
        transition: none;
    }
}
