/* =========================================================
   SmartComplaints — login.css (Corporate mood pass)
   Full-bleed cinematic carousel, kicker typography, branded
   background texture, auto-play progress bar. Same --cms-*
   light palette as index.css, defined in common.css.
   ========================================================= */

/* -------- Footer override (this page only) --------
   #con_head is NOT overridden here anymore: the frosted-glass
   header is common.css's site-wide default now, so this page just
   inherits it like every other page. */body.page-login .logo_cms_text {
    color: var(--cms-primary-dark);
    border-left-color: var(--cms-border-dark);
}

body.page-login #con_foot {
    background: var(--cms-surface);
    border-top: 1px solid var(--cms-border);
}

body.page-login #foot_txt {
    color: var(--cms-text-muted);
}

/* -------- Login toggle button (header) -------- */
.login_toggle_btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background .15s ease;
}

.login_toggle_btn:hover {
    background: var(--cms-accent-soft);
}

.login_toggle_btn .toggle_icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cms-accent-soft);
    border: 1px solid var(--cms-border-dark);
    color: var(--cms-primary-dark);
    transition: background .15s ease, transform .15s ease;
}

.login_toggle_btn .toggle_icon svg {
    width: 15px;
    height: 15px;
}

.login_toggle_btn:hover .toggle_icon,
.login_toggle_btn.active .toggle_icon {
    background: var(--cms-primary);
    color: #fff;
    border-color: var(--cms-primary);
}

.login_toggle_btn .toggle_label {
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--cms-text-light);
}

/* -----------------------------------------------------------
   Main canvas — light bg with branded texture, replacing the
   flat dark gradient inherited from common.css.
   ----------------------------------------------------------- */
#con_login {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.page-login #con_main {
    position: relative;
    display: block !important;
    width: 100%;
    min-width: 0;
    /* Neutralizes common.css's >=1400px/>=1920px breakpoint rules,
       which cap the unscoped #con_main to max-width:1400px and
       center it with margin:0 auto — appropriate for text/table
       content on other pages, but it was leaving ~260px empty
       gutters on each side of this page's carousel on wide
       screens instead of letting it run edge-to-edge as intended.
       .page-login #con_main's higher specificity (class + id) wins
       this regardless of viewport width, so no media query needed
       here. */
    max-width: none;
    margin: 0;

    /* Locked to exactly fill the space between header and footer on
       every screen size. The carousel is full-bleed inside it and the
       login card is an absolute-positioned overlay toggled on top
       (see #con_login_right), so nothing here needs to scroll or grow
       with content, on mobile or otherwise. */
    height: calc(100vh - 60px - 46px);
    min-height: calc(100vh - 60px - 46px);
    flex: 0 0 auto;

    padding: 0 !important;
    overflow: hidden;

    background: var(--cms-bg);
}

/* Branded texture — radial glow + dot-grid, same treatment as
   index.css's landing hero, so the "empty" background reads as
   deliberate rather than flat and unfinished. */
.page-login #con_main::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 30%, var(--cms-accent-soft) 0%, transparent 55%);
    opacity: .6;
    pointer-events: none;
    z-index: 0;
}

.page-login #con_main::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--cms-border-dark) 1px, transparent 1.6px);
    background-size: 28px 28px;
    opacity: .25;
    -webkit-mask-image: radial-gradient(circle at 75% 30%, black 0%, transparent 62%);
    mask-image: radial-gradient(circle at 75% 30%, black 0%, transparent 62%);
    pointer-events: none;
    z-index: 0;
}

/* =========================================================
   FULL-BLEED CINEMATIC CAROUSEL
   ========================================================= */

#con_login_left {
    position: relative;
    z-index: 1;
    width: 100% !important;
    height: 100%;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
}

.panel_badge {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(253, 251, 246, .92);
    border: 1px solid var(--cms-border-dark);
    color: var(--cms-primary-dark);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(23, 32, 39, .1);
}

.panel_badge svg {
    width: 14px;
    height: 14px;
}

#carouselExampleSlidesOnly {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* Bootstrap's own .carousel-inner has no explicit height by default
   (it's auto, sized by content). A percentage height on .carousel-item
   needs a definite height somewhere up this chain to resolve against
   — without this, .carousel-item's height:100% below would be invalid
   and the whole carousel would collapse to 0 height. */
.carousel-inner {
    height: 100%;
}

.carousel-item {
    position: relative;
    height: 100%;
}

/* Full-bleed slide image, cropped to fill the entire panel */
.slide_media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.slide_media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transform-origin: center center;
}

/* Ken Burns effect: slow zoom + pan on the active slide's image,
   giving still photos a video-like sense of motion instead of a
   static crossfade. Alternates pan direction odd/even so all 9
   slides don't move identically — matches the ~5s carousel
   interval, running slightly longer so motion doesn't visibly
   settle before the next crossfade begins. */
@keyframes kenburns_a {
    from { transform: scale(1.06) translate(0, 0); }
    to   { transform: scale(1.18) translate(-2.5%, -2%); }
}

@keyframes kenburns_b {
    from { transform: scale(1.06) translate(0, 0); }
    to   { transform: scale(1.18) translate(2.5%, 2%); }
}

.carousel-item:nth-child(odd).active .slide_media img {
    animation: kenburns_a 6.5s ease-out forwards;
}

.carousel-item:nth-child(even).active .slide_media img {
    animation: kenburns_b 6.5s ease-out forwards;
}

/* Bottom scrim so white caption text stays legible over any
   photo, regardless of its own brightness/contrast. */
.slide_scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(23, 32, 39, 0) 35%,
        rgba(23, 32, 39, .55) 72%,
        rgba(23, 32, 39, .82) 100%
    );
}

.slide_content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 40px 44px 36px;
    box-sizing: border-box;
}

.slide_kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(252, 124, 10, .22);
    border: 1px solid rgba(252, 124, 10, .5);
    color: #ffd8a8;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.slide_title {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(1.5rem, 2.6vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .3);
    /* Reserve space for two lines so .slide_desc/.slide_features
       below don't shift as the typewriter effect grows the text
       from empty to full length. */
    min-height: calc(1.2em * 2);
}

/* Blinking caret while the typewriter effect is running — removed
   once typing finishes so the finished title doesn't sit with a
   permanently blinking cursor after it. */
.slide_title.is_typing::after {
    content: "";
    display: inline-block;
    width: 3px;
    height: .9em;
    margin-left: 4px;
    vertical-align: -0.05em;
    background: currentColor;
    animation: slide_title_caret 1s step-end infinite;
}

@keyframes slide_title_caret {
    50% { opacity: 0; }
}

.slide_desc {
    margin: 0 0 18px;
    max-width: 460px;
    color: rgba(255, 255, 255, .82);
    font-size: .9rem;
    line-height: 1.6;
}

.slide_features {
    display: flex;
    gap: 22px;
}

.feature_item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.feature_item svg {
    width: 17px;
    height: 17px;
    color: #ffb877;
}

.feature_item span {
    font-size: .68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .75);
    letter-spacing: .02em;
}

/* -------- Auto-play progress bar (replaces plain dot indicators) --------
   Sits just above the caption block (kicker + title + desc + features)
   rather than at the top of the image. Since this bar is a single
   shared element — not duplicated per slide, so the prev/next-arrow
   sync logic in login.html has one canonical set of segments to index
   into — it can't flow naturally above each slide's own caption height.
   The "bottom" value below is calibrated to the caption's typical
   rendered height at this breakpoint (padding + kicker + 2-line title
   + desc + features row) plus a small gap; adjust it directly here if
   real content pushes it a few px off. */
.carousel_progress {
    position: absolute;
    left: 44px;
    right: 44px;
    bottom: 0;
    z-index: 3;
    display: flex;
    gap: 6px;
}

.progress_seg {
    position: relative;
    flex: 1 1 0;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .35);
    overflow: hidden;
    cursor: pointer;
}

.progress_seg i {
    display: block;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 2px;
}

.progress_seg.active i {
    animation: progress_fill 5s linear forwards;
}

@keyframes progress_fill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Prev/next arrows */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: auto;
    opacity: 1;
    z-index: 4;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.slide_arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cms-surface);
    border: 1px solid var(--cms-border);
    color: var(--cms-text-light);
    box-shadow: 0 6px 18px rgba(23, 32, 39, .16);
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.slide_arrow svg {
    width: 17px;
    height: 17px;
}

.carousel-control-prev:hover .slide_arrow,
.carousel-control-next:hover .slide_arrow {
    background: var(--cms-primary);
    border-color: var(--cms-primary);
    color: #fff;
    transform: scale(1.06);
}

@media (max-width: 900px) {
    .carousel-control-prev {
        left: 12px;
    }

    .carousel-control-next {
        right: 12px;
    }

    .slide_features {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    /* Title font is smaller here (clamp's vw component), so the
       caption block is shorter — tighten the gap to match. */
    .carousel_progress {
        bottom: 0;
    }
}

@media (max-width: 600px) {
    .carousel-control-prev {
        left: 8px;
    }

    .carousel-control-next {
        right: 8px;
    }

    .slide_arrow {
        width: 32px;
        height: 32px;
    }

    .slide_content {
        padding: 26px 22px 24px;
    }

    .slide_title {
        font-size: 1.35rem;
    }

    .slide_features {
        gap: 14px;
        flex-wrap: wrap;
    }

    .panel_badge {
        top: 16px;
        font-size: .6rem;
        padding: 6px 13px;
    }

    .carousel_progress {
        left: 22px;
        right: 22px;
        bottom: 0;
    }
}

/* =========================================================
   FLOATING LOGIN CARD — light glass, brand accent
   ========================================================= */

#con_login_right {
    position: absolute;
    z-index: 10;

    top: 50%;
    right: clamp(42px, 6vw, 90px);
    transform: translateY(-50%) translateX(14px) scale(.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .26s cubic-bezier(.4, 0, .2, 1);

    width: 240px;
    max-width: calc(100vw - 84px);
    min-width: 200px;
    min-height: 220px;
    height: auto;

    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;

    margin: 0 !important;
    padding: 24px 22px 20px !important;

    background: var(--cms-surface);
    border: 1px solid var(--cms-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 24px 54px rgba(23, 32, 39, .2) !important;
}

#con_login_right.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0) scale(1);
}

.login_card_title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    color: var(--cms-primary-dark);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: -.01em;
}

.login_card_title svg {
    width: 16px;
    height: 16px;
}

#con_login_right .form-group {
    width: 100%;
    margin: 0 0 11px !important;
}

#con_login_right label {
    display: block;
    margin: 0 0 4px;
    color: var(--cms-text-light);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.1;
}

.field_input_wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field_input_wrap .field_icon {
    position: absolute;
    left: 9px;
    width: 13px;
    height: 13px;
    color: var(--cms-text-muted);
    pointer-events: none;
}

.field_input_wrap input {
    padding-left: 30px !important;
}

.pw_toggle {
    position: absolute;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: none;
    border: none;
    color: var(--cms-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s ease, background .15s ease;
}

.pw_toggle svg {
    width: 14px;
    height: 14px;
}

.pw_toggle:hover {
    color: var(--cms-primary-dark);
    background: var(--cms-accent-soft);
}

#con_login_right input[type="password"],
#con_login_right #password {
    padding-right: 30px !important;
}

#con_login_right input[type="text"],
#con_login_right input[type="password"] {
    display: block;
    width: 100%;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid var(--cms-border);
    border-radius: 6px;
    background: var(--cms-surface-soft);
    color: var(--cms-text-dark);
    font-size: .76rem;
    outline: none;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

#con_login_right input[type="text"]::placeholder,
#con_login_right input[type="password"]::placeholder {
    color: var(--cms-text-muted);
}

#con_login_right input[type="text"]:focus,
#con_login_right input[type="password"]:focus {
    border-color: var(--cms-primary);
    background: var(--cms-surface);
    box-shadow: 0 0 0 3px var(--cms-accent-soft);
}

#con_login_right input[type="button"] {
    display: block;
    width: 100%;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    margin: 4px 0 0;
    padding: 3px 5px;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

#con_login_right #login {
    border: 1px solid var(--cms-primary-dark);
    background: radial-gradient(circle at 35% 30%, var(--cms-primary-light), var(--cms-primary) 60%, var(--cms-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(252, 124, 10, .3);
}

#con_login_right #login:hover,
#con_login_right #login:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(252, 124, 10, .4);
}

#con_login_right #otp {
    border: 1px solid var(--cms-border);
    background: transparent;
    color: var(--cms-primary-dark);
}

#con_login_right #otp:hover,
#con_login_right #otp:focus {
    border-color: var(--cms-border-dark);
    background: var(--cms-accent-soft);
}

.login_card_trust {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--cms-border);
    color: var(--cms-text-muted);
    font-size: .64rem;
    font-weight: 600;
}

.login_card_trust svg {
    width: 13px;
    height: 13px;
    color: var(--cms-primary-dark);
    flex-shrink: 0;
}

/* =========================================================
   RESPONSIVE (floating card)
   ========================================================= */

@media (max-width: 900px) {
    #con_login_right {
        right: 24px;
        width: 220px;
    }
}

/* Ultra-wide monitors: give the floating card a touch more room
   instead of staying pinned to the same fixed width as a laptop. */
@media (min-width: 1600px) {
    #con_login_right {
        width: 280px;
        right: clamp(60px, 8vw, 140px);
    }

    .panel_badge,
    .slide_kicker {
        font-size: .74rem;
    }

    .slide_title {
        font-size: clamp(1.8rem, 2.4vw, 2.6rem);
    }

    .carousel_progress {
        bottom: 0;
    }
}

@media (max-width: 600px) {
    #con_login_right {
        position: absolute;
        z-index: 10;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%) scale(.96);
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        margin: 0 !important;
        opacity: 0;
        pointer-events: none;
        max-height: none;
        min-height: 0;
        padding: 22px !important;
        overflow: visible;
        transition: opacity .22s ease, transform .26s cubic-bezier(.4, 0, .2, 1);
    }

    #con_login_right.open {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 360px) {
    #con_login_right input[type="text"],
    #con_login_right input[type="password"],
    #con_login_right input[type="button"] {
        height: 34px;
        min-height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #con_login_right,
    .progress_seg i,
    .slide_arrow,
    .slide_media img,
    .slide_title.is_typing::after {
        transition: none !important;
        animation: none !important;
    }

    .slide_media img {
        transform: scale(1) !important;
    }
}
