/* Delayed Banner Styles */
.delayed-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.delayed-banner-overlay.show {
    display: flex;
    opacity: 1;
}

.delayed-banner-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
}

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

.delayed-banner-close {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border: 2px solid white !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: bold !important;
    z-index: 10001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.delayed-banner-close:hover {
    background: rgba(255, 0, 0, 0.8) !important;
    border-color: white !important;
    transform: scale(1.1) !important;
}

.delayed-banner-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 800px;
    max-height: 600px;
    object-fit: contain;
}

/* GIF specific optimizations */
.delayed-banner-image[src$=".gif"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Video specific styles */
video.delayed-banner-image {
    max-width: 600px;
    max-height: 400px;
    cursor: pointer;
}

video.delayed-banner-image:hover {
    opacity: 0.9;
}

/* Video container for play button overlay */
.delayed-banner-container {
    position: relative;
}

/* Custom video controls styling */
video.delayed-banner-image::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

video.delayed-banner-image::-webkit-media-controls-play-button {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.delayed-banner-content {
    padding: 20px;
    text-align: center;
}

.delayed-banner-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.delayed-banner-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.delayed-banner-cta {
    display: inline-block;
    padding: 12px 30px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.delayed-banner-cta:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .delayed-banner-container {
        max-width: 95%;
        max-height: 95%;
        margin: 10px;
    }
    
    .delayed-banner-image {
        max-height: 400px;
    }
    
    .delayed-banner-content {
        padding: 15px;
    }
    
    .delayed-banner-title {
        font-size: 20px;
    }
    
    .delayed-banner-description {
        font-size: 14px;
    }
    
    .delayed-banner-cta {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Animation for banner entrance */
@keyframes slideInFromTop {
    from {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.delayed-banner-container.animate-top {
    animation: slideInFromTop 0.5s ease-out;
}

.delayed-banner-container.animate-bottom {
    animation: slideInFromBottom 0.5s ease-out;
}

.delayed-banner-container.animate-fade {
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner while banner is preparing */
.delayed-banner-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9998;
    display: none;
}

.delayed-banner-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cookie/localStorage notice */
.delayed-banner-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10000;
    display: none;
}
