/* ===========================
   Popup Styles - Banner with Header & Footer
   =========================== */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.popup-overlay.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.popup-container {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 480px;
    width: 88%;
    overflow: hidden;
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.popup-overlay.show .popup-container {
    transform: scale(1);
    animation: popupSlideIn 0.5s ease-out forwards;
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Header */
.popup-header {
    background: linear-gradient(135deg, #ee4d2d 0%, #ff6b35 100%);
    color: white;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.popup-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
}

/* Close Button */
.popup-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.popup-close-btn svg {
    width: 20px;
    height: 20px;
}

.popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

/* Body - Banner Image */
.popup-body {
    padding: 0;
    margin: 0;
    background: white;
    position: relative;
    max-height: 60vh;
    overflow: hidden;
    line-height: 0;
}

.popup-banner-btn {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    display: block;
    line-height: 0;
}

.popup-banner-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    margin: 0;
    padding: 0;
}

/* Footer - Action Button */
.popup-footer {
    padding: 14px 16px;
    margin: 0;
    background: white;
}

.popup-action-btn {
    width: 100%;
    display: inline-block;
    text-align: center;
    background: linear-gradient(135deg, #ee4d2d 0%, #ff6b35 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(238, 77, 45, 0.3);
    margin: 0;
}

.popup-action-btn:hover {
    background: linear-gradient(135deg, #d43d1f 0%, #e65525 100%);
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.4);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.popup-action-btn:active {
    transform: scale(0.98);
}

/* Responsive */

/* Large Tablets and Small Desktops */
@media (max-width: 992px) {
    .popup-container {
        max-width: 500px;
        width: 85%;
    }

    .popup-body {
        max-height: 55vh;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .popup-container {
        max-width: 450px;
        width: 88%;
    }

    .popup-header {
        padding: 10px 14px;
    }

    .popup-title {
        font-size: 1rem;
    }

    .popup-body {
        max-height: 50vh;
    }

    .popup-footer {
        padding: 14px 16px;
    }

    .popup-action-btn {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

/* Mobile Landscape and Large Phones */
@media (max-width: 576px) {
    .popup-container {
        width: 90%;
        max-width: 90%;
        border-radius: 12px;
    }

    .popup-header {
        padding: 10px 12px;
    }

    .popup-title {
        font-size: 0.95rem;
    }

    .popup-close-btn {
        width: 32px;
        height: 32px;
    }

    .popup-close-btn svg {
        width: 20px;
        height: 20px;
    }

    .popup-body {
        max-height: 45vh;
    }

    .popup-footer {
        padding: 12px 14px;
    }

    .popup-action-btn {
        font-size: 0.95rem;
        padding: 10px 16px;
    }
}

/* Small Mobile Phones */
@media (max-width: 400px) {
    .popup-container {
        width: 92%;
        max-width: 92%;
        border-radius: 10px;
    }

    .popup-header {
        padding: 8px 10px;
    }

    .popup-title {
        font-size: 0.9rem;
    }

    .popup-close-btn {
        width: 28px;
        height: 28px;
    }

    .popup-close-btn svg {
        width: 18px;
        height: 18px;
    }

    .popup-body {
        max-height: 40vh;
    }

    .popup-footer {
        padding: 10px 12px;
    }

    .popup-action-btn {
        font-size: 0.9rem;
        padding: 9px 14px;
    }
}

/* Landscape Orientation on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .popup-container {
        max-height: 90vh;
    }

    .popup-body {
        max-height: 35vh;
    }

    .popup-header {
        padding: 8px 12px;
    }

    .popup-footer {
        padding: 8px 12px;
    }
}