/**
 * Popup Styles
 * mumsataa.my.id
 */

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

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

/* Popup Container */
.popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s ease;
}

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

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

.popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.popup-close i {
    font-size: 18px;
    color: #333;
}

/* Popup Content */
.popup-content {
    padding: 30px;
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: inherit;
}

.popup-body {
    font-size: 1rem;
    line-height: 1.6;
    color: inherit;
}

.popup-body p:last-child {
    margin-bottom: 0;
}

/* Popup Image */
.popup-image {
    width: 100%;
    height: auto;
    display: block;
}

.popup-image-container {
    width: 100%;
    overflow: hidden;
}

/* Popup Link Button */
.popup-link {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.popup-link:hover {
    background: #4338ca;
    color: white;
}

/* Position Variants */

/* Center (default) */
.popup-position-center .popup-container {
    /* Default styles */
}

/* Top */
.popup-position-top .popup-overlay {
    align-items: flex-start;
    padding-top: 50px;
}

.popup-position-top .popup-container {
    border-radius: 0 0 16px 16px;
}

/* Bottom */
.popup-position-bottom .popup-overlay {
    align-items: flex-end;
    padding-bottom: 50px;
}

.popup-position-bottom .popup-container {
    border-radius: 16px 16px 0 0;
}

/* Bottom Right */
.popup-position-bottom-right .popup-overlay {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    background: transparent;
    pointer-events: none;
}

.popup-position-bottom-right .popup-container {
    width: 400px;
    max-width: calc(100vw - 40px);
    pointer-events: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Top Right */
.popup-position-top-right .popup-overlay {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
    background: transparent;
    pointer-events: none;
}

.popup-position-top-right .popup-container {
    width: 400px;
    max-width: calc(100vw - 40px);
    pointer-events: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Newsletter Form */
.popup-newsletter-form {
    margin-top: 20px;
}

.popup-newsletter-form .input-group {
    display: flex;
    gap: 10px;
}

.popup-newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.popup-newsletter-form button {
    padding: 12px 24px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.popup-newsletter-form button:hover {
    background: #4338ca;
}

/* Responsive */
@media (max-width: 576px) {
    .popup-container {
        max-width: 95vw;
        margin: 10px;
    }
    
    .popup-content {
        padding: 20px;
    }
    
    .popup-title {
        font-size: 1.25rem;
    }
    
    .popup-position-bottom-right .popup-container,
    .popup-position-top-right .popup-container {
        width: 100%;
        max-width: calc(100vw - 20px);
    }
    
    .popup-position-bottom-right .popup-overlay,
    .popup-position-top-right .popup-overlay {
        padding: 10px;
    }
    
    .popup-position-top .popup-overlay,
    .popup-position-bottom .popup-overlay {
        padding: 0;
    }
}

/* Animation */
@keyframes popupBounce {
    0% { transform: scale(0.8) translateY(20px); }
    50% { transform: scale(1.02) translateY(-5px); }
    100% { transform: scale(1) translateY(0); }
}

.popup-overlay.active .popup-container.animate-bounce {
    animation: popupBounce 0.5s ease;
}

/* Dark Mode Support */
.dark-mode .popup-container {
    background: #1e293b;
    color: #f1f5f9;
}

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

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

.dark-mode .popup-close i {
    color: #f1f5f9;
}

.dark-mode .popup-newsletter-form input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

/* Promo Badge */
.popup-promo-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 10px;
}
