/* Popups Container */
.popups-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.popups-container.top {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.popups-container.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popups-container.bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Popup Base */
.popup {
    pointer-events: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    animation: popupSlideIn 0.4s ease-out;
    position: relative;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popupSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.popup.closing {
    animation: popupSlideOut 0.3s ease-in forwards;
}

/* Popup Image */
.popup-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Popup Content */
.popup-content {
    padding: 30px;
    position: relative;
}

.popup-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
}

.popup-content p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 14px;
}

/* Popup Button */
.btn-popup {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-popup:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.popup-close:hover {
    opacity: 0.7;
}

/* Popup Themes */
.popup-light {
    background: #ffffff;
    color: #333;
}

.popup-light .popup-content h3 {
    color: #333;
}

.popup-light .popup-content p {
    color: #666;
}

.popup-light .btn-popup {
    background: #007bff;
    color: white;
}

.popup-light .btn-popup:hover {
    background: #0056b3;
    color: white;
}

.popup-light .popup-close {
    color: #666;
}

/* Dark Theme */
.popup-dark {
    background: #2c3e50;
    color: #ecf0f1;
}

.popup-dark .popup-content h3 {
    color: #ecf0f1;
}

.popup-dark .popup-content p {
    color: #bdc3c7;
}

.popup-dark .btn-popup {
    background: #3498db;
    color: white;
}

.popup-dark .btn-popup:hover {
    background: #2980b9;
    color: white;
}

.popup-dark .popup-close {
    color: #ecf0f1;
}

/* Primary Theme */
.popup-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.popup-primary .popup-content h3 {
    color: white;
}

.popup-primary .popup-content p {
    color: rgba(255, 255, 255, 0.9);
}

.popup-primary .btn-popup {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

.popup-primary .btn-popup:hover {
    background: white;
    color: #667eea;
}

.popup-primary .popup-close {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .popup {
        max-width: 90vw;
        width: 90vw;
    }

    .popup-content {
        padding: 20px;
    }

    .popup-image {
        height: 150px;
    }

    .popup-content h3 {
        font-size: 20px;
    }

    .popup-content p {
        font-size: 13px;
    }
}