/* ============================================================================
   Login Banner Carousel — full-bleed, theme-aware
   - Pure crossfade + manual prev/next arrows below the image
   - Full-bleed blue panel (no padding/gaps), matches the WebPayX logo blue
   ========================================================================== */

:root {
    /* WebPayX-blue theme — plain solid fill, exact color sampled from the logo's X mark */
    --lb-bg-light: #004AAD;
    --lb-bg-dark:  #002d68;
}

/* Full-bleed left panel — flush to the left, top and bottom edges, no gaps */
.login-banner-outer {
    background: var(--lb-bg-light);
    box-shadow: 12px 0 45px -18px rgba(15, 23, 42, 0.45);
}

.dark .login-banner-outer {
    background: var(--lb-bg-dark);
}

/* Decorative ambient glow — blue-only accents to match the logo */
.login-banner-outer::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.18), transparent 42%),
        radial-gradient(circle at 88% 85%, rgba(96, 165, 250, 0.35), transparent 48%),
        radial-gradient(circle at 55% 45%, rgba(59, 130, 246, 0.20), transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.dark .login-banner-outer::before {
    background:
        radial-gradient(circle at 12% 10%, rgba(96, 165, 250, 0.28), transparent 42%),
        radial-gradient(circle at 88% 85%, rgba(37, 99, 235, 0.35), transparent 48%),
        radial-gradient(circle at 55% 45%, rgba(29, 78, 216, 0.25), transparent 60%);
}

/* Inner carousel — purely a layout box now, colour comes from .login-banner-outer */
.login-banner-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prev / next arrow buttons — glassmorphism, side by side below the image */
.carousel-arrow {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-2px);
}

.carousel-arrow:active {
    transform: translateY(0);
}

.carousel-arrow:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

/* Slides — pure crossfade, transparent PNGs floating on the blue backdrop.
   Fixed 420x420px box for every slide, identical regardless of the source
   image's own dimensions/aspect ratio — object-fit: contain scales each
   image to fit inside without cropping or stretching. */
.login-banner-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 500px;
    object-fit: cover;
    opacity: 0;
    filter: drop-shadow(0 20px 35px rgba(15, 23, 42, 0.35));
    transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.login-banner-slide.is-active {
    opacity: 1;
}

/* Glassmorphism caption chip */
.login-banner-caption {
    position: absolute;
    left: 1.75rem;
    right: 1.75rem;
    bottom: 1.75rem;
    z-index: 5;
    text-align: left;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.875rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    max-width: calc(100% - 3.5rem);
}

/* Force the reddish theme even when the browser autofills the field —
   Chrome/Edge/Safari paint their own light-blue/yellow background on
   autofilled inputs and ignore normal background-color, so it must be
   overridden via the -webkit-autofill pseudo-class with an inset box-shadow. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fef2f2 inset !important;
    box-shadow: 0 0 0 1000px #fef2f2 inset !important;
    -webkit-text-fill-color: #171717 !important;
    caret-color: #171717;
    transition: background-color 5000s ease-in-out 0s;
}

.dark input:-webkit-autofill,
.dark input:-webkit-autofill:hover,
.dark input:-webkit-autofill:focus,
.dark input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgb(38 38 38 / 0.6) inset !important;
    box-shadow: 0 0 0 1000px rgb(38 38 38 / 0.6) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .login-banner-slide { transition: none !important; }
}

/* ============================================================================
   Compact Live Preview override (admin "Login Banners" settings page only)
   Scoped to .login-preview-compact so the real, full-bleed login-page
   carousel (.login-banner-outer / .login-banner-slide elsewhere) is
   completely unaffected — same carousel markup/JS, smaller box here.
   ========================================================================== */
.login-preview-compact {
    position: relative;
}

.login-preview-compact .login-banner-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.login-preview-compact .login-banner-slide {
    width: 88%;
    height: 88%;
}

.login-preview-compact .carousel-arrow {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
}

.login-preview-compact .login-banner-caption {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

@media (max-width: 480px) {
    .login-preview-compact .login-banner-slide {
        width: 90%;
        height: 90%;
    }
}

/* Small screens (caption sizing only — the carousel panel itself is desktop-only) */
@media (max-width: 640px) {
    .login-banner-caption {
        font-size: 0.8rem;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        padding: 0.5rem 0.75rem;
    }
}