/**
 * Smart Exit Popup - Frontend Styles
 */

/* Popup Overlay */
.sep-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sep-popup-overlay.sep-visible {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.sep-popup-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.sep-popup-overlay.sep-visible .sep-popup-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.sep-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sep-popup-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.sep-popup-close:active {
    transform: scale(0.95);
}

.sep-popup-close svg {
    color: #374151;
}

/* Popup Content */
.sep-popup-content {
    position: relative;
}

/* Slider */
.sep-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.sep-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sep-slide {
    flex: 0 0 100%;
    min-width: 100%;
}

.sep-slide-link {
    display: block;
    line-height: 0;
}

.sep-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Slider Navigation */
.sep-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 5;
}

.sep-slider-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

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

.sep-slider-prev {
    left: 16px;
}

.sep-slider-next {
    right: 16px;
}

.sep-slider-nav svg {
    color: #374151;
}

/* Slider Dots */
.sep-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.sep-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sep-dot:hover {
    background: rgba(255, 255, 255, 0.75);
}

.sep-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Content Banner (SEO-friendly) */
.sep-content-banner {
    margin: 40px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sep-content-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.sep-content-slide {
    display: none;
}

.sep-content-slide.active {
    display: block;
    animation: sep-fade-in 0.5s ease;
}

@keyframes sep-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sep-content-slide a {
    display: block;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sep-content-slide a:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.2);
}

.sep-content-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.sep-content-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.sep-content-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    background: #cbd5e1;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sep-content-dot:hover {
    background: #94a3b8;
}

.sep-content-dot.active {
    background: #6366f1;
    transform: scale(1.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sep-popup-overlay {
        padding: 15px;
    }
    
    .sep-popup-container {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .sep-popup-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }
    
    .sep-popup-close svg {
        width: 20px;
        height: 20px;
    }
    
    .sep-slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .sep-slider-prev {
        left: 8px;
    }
    
    .sep-slider-next {
        right: 8px;
    }
    
    .sep-slider-nav svg {
        width: 24px;
        height: 24px;
    }
    
    .sep-slider-dots {
        bottom: 12px;
        padding: 6px 12px;
        gap: 8px;
    }
    
    .sep-dot {
        width: 8px;
        height: 8px;
    }
    
    .sep-content-banner {
        margin: 24px 0;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .sep-popup-overlay {
        padding: 10px;
    }
    
    .sep-slider-nav {
        width: 36px;
        height: 36px;
    }
    
    .sep-slider-prev {
        left: 6px;
    }
    
    .sep-slider-next {
        right: 6px;
    }
    
    .sep-slider-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* Animation for popup entry */
@keyframes sep-popup-bounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Print styles - hide popup */
@media print {
    .sep-popup-overlay {
        display: none !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .sep-popup-overlay,
    .sep-popup-container,
    .sep-slider-track,
    .sep-slide,
    .sep-content-slide,
    .sep-content-slide a {
        transition: none;
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .sep-content-banner {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .sep-content-dot {
        background: #475569;
    }
    
    .sep-content-dot:hover {
        background: #64748b;
    }
    
    .sep-content-dot.active {
        background: #818cf8;
    }
}
