/* Popup Overlay */
#flag-promotion-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

/* Popup Content */
.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: visible;
    max-width: 90vw;
    max-height: 90vh;
    animation: slideIn 0.3s ease-out;
    display: inline-block;
    line-height: 0;
}

/* Popup Image */
.popup-content img {
    width: auto;
    height: auto;
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
}

/* Close Button */
.popup-close {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 30px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.popup-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #666;
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .popup-content {
        position: fixed !important;
        left: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 40px) !important;
        display: block !important;
    }

    .popup-content img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: calc(100vh - 40px) !important;
        border-radius: 10px;
        display: block !important;
    }

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

@media (max-width: 480px) {
    .popup-content {
        position: fixed !important;
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: calc(100vw - 30px) !important;
        max-width: calc(100vw - 30px) !important;
        max-height: calc(100vh - 20px) !important;
        display: block !important;
    }

    .popup-content img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: calc(100vh - 20px) !important;
        border-radius: 10px;
        display: block !important;
    }

    .popup-close {
        top: -12px;
        right: -12px;
        font-size: 20px;
        width: 30px;
        height: 30px;
    }
}