/*
 * ==========================================================================
 * CAROUSEL COMPONENT STYLES (rem-based)
 * ==========================================================================
 * Generic carousel component with slides, indicators, and navigation.
 * Can be used standalone or with theme variants (auth, hero, etc).
 * ==========================================================================
 */

/* ========================================
   CAROUSEL CONTAINER
   ======================================== */

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

/* ========================================
   CAROUSEL SLIDES
   ======================================== */

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
    background-size: cover;
    background-position: center;
}

.carousel-slide.active {
    opacity: 1;
}

/* ========================================
   SLIDE CONTENT
   ======================================== */

.carousel-slide-content {
    z-index: 2;
}

/* Default light text (for dark backgrounds) */
.carousel-slide-content {
    color: white;
}

.carousel-slide-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.carousel-slide-description {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    opacity: 0.95;
    max-width: 400px;
}

/* ========================================
   CAROUSEL INDICATORS
   ======================================== */

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 3rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    width: 2rem;
    height: 0.1875rem;
    border-radius: 0.125rem;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-indicator.active {
    background: white;
    width: 3rem;
}

/* Dark theme indicators (for light backgrounds) */
.carousel--dark .carousel-indicator {
    background: rgba(0, 0, 0, 0.2);
}

.carousel--dark .carousel-indicator:hover {
    background: rgba(0, 0, 0, 0.4);
}

.carousel--dark .carousel-indicator.active {
    background: var(--text-primary);
}

/* ========================================
   CAROUSEL NAVIGATION ARROWS
   ======================================== */

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-round);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: white;
    padding: 0;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav.prev {
    left: 1.5rem;
}

.carousel-nav.next {
    right: 1.5rem;
}

.carousel-nav svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Dark theme navigation (for light backgrounds) */
.carousel--dark .carousel-nav {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.carousel--dark .carousel-nav:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* ========================================
   SIZE VARIANTS
   ======================================== */

/* Compact carousel */
.carousel--compact .carousel-slide {
    padding: 2rem;
}

.carousel--compact .carousel-slide-title {
    font-size: var(--text-5xl);
}

.carousel--compact .carousel-slide-description {
    font-size: 1rem;
}

.carousel--compact .carousel-indicators {
    bottom: 1.5rem;
    left: 2rem;
}

.carousel--compact .carousel-nav {
    width: 2.5rem;
    height: 2.5rem;
}

.carousel--compact .carousel-nav svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1023px) {
    .carousel-slide-title {
        font-size: var(--text-7xl);
    }
}

@media (max-width: 768px) {
    .carousel-slide {
        padding: 2rem 1.5rem;
    }

    .carousel-slide-title {
        font-size: var(--text-4xl);
    }

    .carousel-slide-description {
        font-size: 1rem;
    }

    .carousel-indicators {
        bottom: 1.5rem;
        left: 1.5rem;
    }

    .carousel-nav {
        width: 2.5rem;
        height: 2.5rem;
    }

    .carousel-nav.prev {
        left: 1rem;
    }

    .carousel-nav.next {
        right: 1rem;
    }

    .carousel-nav svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .carousel-slide {
        transition: opacity 0.3s ease;
    }

    .carousel-nav,
    .carousel-indicator {
        transition: none;
    }
}

.carousel-nav:focus-visible,
.carousel-indicator:focus-visible {
    outline: var(--border-width-focus) solid var(--accent-primary);
    outline-offset: var(--border-width-focus);
}
