/**
 * Platform Banner CSS
 * Styles for the splash banner display
 */

.pb-splash-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pbFadeIn 0.3s ease-in-out;
}

.pb-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.pb-banner-container {
    position: relative;
    z-index: 10;
    width: 336px;
    height: 280px;
    max-width: 90vw;
    max-height: 90vh;
    animation: pbSlideUp 0.4s ease-out;
}

.pb-banner-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pb-banner-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s ease;
    z-index: 20;
}

.pb-banner-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.pb-banner-link {
    display: block;
    text-decoration: none;
    outline: none;
}

.pb-banner-image {
    width: 336px;
    height: 280px;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.pb-banner-link:hover .pb-banner-image {
    transform: scale(1.02);
}

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

@keyframes pbSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .pb-banner-container {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .pb-banner-image {
        max-height: 70vh;
    }
    
    .pb-banner-close {
        top: -35px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .pb-banner-container {
        max-width: 98vw;
        max-height: 80vh;
    }
    
    .pb-banner-image {
        max-height: 60vh;
    }
    
    .pb-banner-close {
        top: -30px;
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
}

/* Landscape orientation optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .pb-banner-container {
        max-width: 80vw;
        max-height: 90vh;
    }
    
    .pb-banner-image {
        max-height: 70vh;
        max-width: 80vw;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pb-banner-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pb-banner-close {
        background: rgba(0, 0, 0, 0.8);
        color: #fff;
    }
    
    .pb-banner-close:hover {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pb-splash-banner,
    .pb-banner-container,
    .pb-banner-image {
        animation: none;
        transition: none;
    }
}

/* Loading state */
.pb-splash-banner.loading .pb-banner-image {
    opacity: 0.7;
    filter: blur(2px);
}

/* Error state */
.pb-splash-banner.error .pb-banner-container {
    border: 2px solid #dc3232;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    color: #dc3232;
}

/* Accessibility improvements */
.pb-splash-banner:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.pb-banner-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .pb-splash-banner {
        display: none !important;
    }
}
