/**
 * @file carousel.css
 * @description App-store style info carousel overlay
 *
 * @requires base.css (CSS variables)
 * @usedBy index.php (#carousel-overlay)
 * @usedBy js/components/carousel.js (info button, auto-advance)
 *
 * @status COMPLETE
 */

/* ==================== CAROUSEL OVERLAY ==================== */
.carousel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.carousel-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.dark-mode .carousel-overlay {
    background: rgba(0,0,0,0.75);
}

/* ==================== MODAL ==================== */
.carousel-modal {
    background: var(--card-light);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s var(--ease-smooth);
    position: relative;
}

.carousel-overlay.active .carousel-modal {
    transform: scale(1) translateY(0);
}

body.dark-mode .carousel-modal {
    background: var(--card-dark);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}

/* ==================== CLOSE BUTTON ==================== */
.carousel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.1);
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.carousel-close:hover {
    background: rgba(0,0,0,0.2);
    transform: scale(1.1);
}

body.dark-mode .carousel-close {
    background: rgba(255,255,255,0.1);
}

body.dark-mode .carousel-close:hover {
    background: rgba(255,255,255,0.2);
}

/* ==================== SLIDES ==================== */
.carousel-slides {
    display: flex;
    transition: transform 0.5s var(--ease-smooth);
}

.carousel-slide {
    min-width: 100%;
    padding: 50px 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.slide-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.slide-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: inherit;
}

.slide-description {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.6;
    max-width: 320px;
}

/* ==================== NAVIGATION ==================== */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .carousel-nav {
    border-top-color: rgba(255,255,255,0.05);
}

.carousel-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.15);
    background: transparent;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.carousel-arrow:hover {
    opacity: 1;
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

body.dark-mode .carousel-arrow {
    border-color: rgba(255,255,255,0.2);
}

/* ==================== DOTS ==================== */
.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.carousel-dot:hover:not(.active) {
    background: rgba(0,0,0,0.3);
}

body.dark-mode .carousel-dot {
    background: rgba(255,255,255,0.2);
}

body.dark-mode .carousel-dot.active {
    background: var(--primary-light);
}

body.dark-mode .carousel-dot:hover:not(.active) {
    background: rgba(255,255,255,0.4);
}

/* ==================== PROGRESS BAR ==================== */
.carousel-progress {
    height: 3px;
    background: rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

body.dark-mode .carousel-progress {
    background: rgba(255,255,255,0.05);
}

.carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    transition: width 0.1s linear;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 520px) {
    .carousel-modal {
        max-width: 95%;
        border-radius: 16px;
    }

    .carousel-slide {
        padding: 45px 25px 25px;
    }

    .slide-icon {
        font-size: 3rem;
    }

    .slide-title {
        font-size: 1.2rem;
    }

    .slide-description {
        font-size: 0.9rem;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}
