/**
 * Banner Pop-up Styles - Modern & Elegant
 * Responsive design for all devices
 */

/* Modal Container */
.banner-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-popup-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Overlay with blur effect */
.banner-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.85) 100%
    );
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    animation: overlayFadeIn 0.4s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Container */
.banner-popup-container {
    position: relative;
    z-index: 10000;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    margin: auto;
    animation: containerSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes containerSlideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Content Card */
.banner-popup-content {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.banner-popup-modal.show .banner-popup-content {
    animation: contentPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes contentPopIn {
    0% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Close Button - Modern Design */
.banner-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 0;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.banner-popup-close:hover {
    background: #ffffff;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.banner-popup-close:active {
    transform: scale(0.95) rotate(90deg);
}

.banner-popup-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Progress Bar */
.banner-popup-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 10001;
    overflow: hidden;
}

.banner-popup-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a6f 50%, #c44569 100%);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(238, 90, 111, 0.5);
}

/* Image Wrapper */
.banner-popup-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.banner-popup-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    cursor: pointer;
}

.banner-popup-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.banner-popup-link:hover .banner-popup-img {
    transform: scale(1.05);
}

/* Image Overlay with CTA */
.banner-popup-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.banner-popup-link:hover .banner-popup-image-overlay {
    opacity: 1;
}

.banner-popup-cta {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.banner-popup-link:hover .banner-popup-cta {
    transform: translateY(0);
}

.banner-popup-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* Body Section */
.banner-popup-body {
    padding: 24px 28px;
    text-align: center;
}

.banner-popup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-popup-modal {
        padding: 12px;
    }

    .banner-popup-container {
        max-width: 100%;
        max-height: 85vh;
    }

    .banner-popup-content {
        border-radius: 20px;
    }

    .banner-popup-close {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }

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

    .banner-popup-body {
        padding: 20px;
    }

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

    .banner-popup-image {
        padding-top: 60%; /* Slightly taller on mobile */
    }

    .banner-popup-cta {
        padding: 10px 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .banner-popup-modal {
        padding: 8px;
    }

    .banner-popup-container {
        max-height: 90vh;
    }

    .banner-popup-content {
        border-radius: 16px;
    }

    .banner-popup-close {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }

    .banner-popup-body {
        padding: 16px;
    }

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

    .banner-popup-image-overlay {
        padding: 16px;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .banner-popup-container {
        max-width: 600px;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .banner-popup-container {
        max-width: 700px;
    }

    .banner-popup-title {
        font-size: 26px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .banner-popup-modal,
    .banner-popup-content,
    .banner-popup-close,
    .banner-popup-img,
    .banner-popup-image-overlay {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .banner-popup-content {
        border: 2px solid #000;
    }

    .banner-popup-close {
        border: 2px solid #000;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    .banner-popup-content {
        background: #1a1a1a;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    }

    .banner-popup-title {
        color: #ffffff;
    }

    .banner-popup-close {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

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