/**
 * Auto Popup Styles
 * Modern, responsive popup with smooth animations
 */

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

/* Show state */
.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

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

.popup-overlay.show .popup-container {
    transform: scale(1);
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background-color: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

.popup-close:focus {
    outline: 2px solid #ee4d2d;
    outline-offset: 2px;
}

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

/* Title Section */
.popup-title-section {
    padding: 20px 20px 15px 20px;
    text-align: center;
    background: linear-gradient(135deg, #ee4d2d 0%, #ff6b3d 100%);
    border-radius: 20px 20px 0 0;
}

.popup-main-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
}

/* Banner Section */
.popup-banner {
    cursor: pointer;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    margin: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.popup-banner:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(238, 77, 45, 0.3);
}

.popup-banner:focus {
    outline: 3px solid #ee4d2d;
    outline-offset: 3px;
}

.popup-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Text Content */
.popup-text {
    text-align: center;
    margin-bottom: 20px;
}

.popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #ee4d2d;
    margin-bottom: 10px;
    line-height: 1.3;
}

.popup-description {
    font-size: 16px;
    color: #333333;
    line-height: 1.6;
    margin: 0;
}

/* Action Button */
.popup-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #ee4d2d 0%, #ff6b3d 100%);
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.4);
}

.popup-action-btn:hover {
    background: linear-gradient(135deg, #d43d1d 0%, #ee5b2d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 77, 45, 0.5);
}

.popup-action-btn:active {
    transform: translateY(0);
}

.popup-action-btn:focus {
    outline: 3px solid #ee4d2d;
    outline-offset: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .popup-container {
        width: 95%;
        border-radius: 15px;
    }

    .popup-title-section {
        padding: 15px 15px 12px 15px;
        border-radius: 15px 15px 0 0;
    }

    .popup-main-title {
        font-size: 18px;
    }

    .popup-banner {
        border-radius: 0 0 15px 15px;
    }

    .popup-title {
        font-size: 20px;
    }

    .popup-description {
        font-size: 14px;
    }

    .popup-action-btn {
        font-size: 16px;
        padding: 12px 25px;
    }

    .popup-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .popup-container {
        width: 95%;
        max-height: 85vh;
    }

    .popup-title-section {
        padding: 12px 12px 10px 12px;
        border-radius: 12px 12px 0 0;
    }

    .popup-main-title {
        font-size: 16px;
    }

    .popup-banner {
        border-radius: 0 0 12px 12px;
    }

    .popup-content {
        padding: 0;
    }

    .popup-title {
        font-size: 18px;
    }

    .popup-description {
        font-size: 13px;
    }

    .popup-action-btn {
        font-size: 15px;
        padding: 10px 20px;
    }
}

/* Animation for banner image */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.popup-banner:hover .popup-banner-image {
    animation: pulse 1s ease-in-out;
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .popup-overlay,
    .popup-container,
    .popup-close,
    .popup-banner,
    .popup-action-btn {
        transition: none;
        animation: none;
    }
}
