/**
 * FAds CSS Styling
 * Luxury-themed ad styling matching the site design
 */

/* ==================== CONTENT AD ==================== */
.fads-content-ad {
    margin: 48px 0;
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.fads-content-ad::before {
    content: 'SPONSORED';
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 16px;
    font-weight: 600;
}

.fads-content-ad a {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fads-content-ad a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
}

.fads-content-ad img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fads-content-ad {
        margin: 32px 0;
        padding: 24px 0;
    }
}

/* ==================== FOOTER POPUP (STICKY BAR) ==================== */
.fads-footer-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20vh; /* 20% of viewport height */
    background: #0A1628; /* Dark navy background */
    z-index: 9999;
    transform: translateY(100%); /* Hidden by default */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.fads-footer-popup.show {
    transform: translateY(0); /* Slide up */
}

/* Close Button (Top-Left) */
.fads-close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fads-close-btn:hover {
    background: white;
    transform: scale(1.1);
}

.fads-close-btn svg {
    color: #0A1628;
}

/* Ad Link & Image */
.fads-popup-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fads-popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill entire space */
    object-position: center;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .fads-footer-popup {
        height: 25vh; /* Slightly taller on mobile */
    }
    
    .fads-close-btn {
        width: 36px;
        height: 36px;
        top: 8px;
        left: 8px;
    }
    
    .fads-close-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Ensure content doesn't hide behind popup when visible */
body.fads-popup-active {
    padding-bottom: 20vh;
}

@media (max-width: 768px) {
    body.fads-popup-active {
        padding-bottom: 25vh;
    }
}

/* OLD MODAL STYLES - REMOVE */
/* Deprecated: Modal-style popup removed */
.fads-popup,
.popup-overlay,
.popup-content,
.popup-close {
    display: none !important;
}

/* ==================== VIDEO WIDGET (STICKY) ==================== */
.fads-video-widget {
    position: fixed;
    width: 320px;
    max-width: calc(100vw - 40px);
    z-index: 9998;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: #000;
    transform: translateY(400px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fads-video-widget.show {
    transform: translateY(0);
    opacity: 1;
}

/* Position Variants */
.fads-video-bottom-right {
    bottom: 20px;
    right: 20px;
}

.fads-video-bottom-left {
    bottom: 20px;
    left: 20px;
}

.widget-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    z-index: 10;
    line-height: 1;
}

.widget-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Video Container */
.video-widget-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

/* Video Poster */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.video-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-poster-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* Play Button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    z-index: 5;
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Iframe */
.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Click Overlay (invisible) */
.video-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.01);
    z-index: 5;
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fads-video-widget {
        width: calc(100% - 40px);
        max-width: 320px;
    }
    
    .fads-video-bottom-right,
    .fads-video-bottom-left {
        right: 20px;
        left: 20px;
    }
    
    .widget-close {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .fads-video-widget {
        bottom: 12px;
    }
}

/* ==================== LOADING STATES ==================== */
.fads-content-ad img,
.popup-content img,
.fads-video-widget img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

.fads-content-ad img[src],
.popup-content img[src],
.fads-video-widget img[src] {
    animation: none;
    background: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== ACCESSIBILITY ==================== */
.fads-popup:focus-within,
.fads-video-widget:focus-within {
    outline: 3px solid #D4AF37;
    outline-offset: 2px;
}

.popup-close:focus,
.widget-close:focus {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .fads-content-ad,
    .fads-popup,
    .fads-video-widget {
        display: none !important;
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    .fads-content-ad a,
    .popup-close,
    .widget-close,
    .fads-video-widget {
        transition: none !important;
        animation: none !important;
    }
    
    .popup-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

