/**
 * TurnFile 360 - Ad Styles
 * Comprehensive styling for all ad formats
 */

/* ═══════════════════════════════════════════════════════════════
   SOCIAL BAR AD (Fixed Bottom)
   ═══════════════════════════════════════════════════════════════ */

.social-bar-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e5e7eb;
    backdrop-filter: blur(10px);
    max-height: 100px;
    overflow: hidden;
}

/* Ensure content doesn't hide behind social bar */
body {
    padding-bottom: 100px;
}

@media (max-width: 768px) {
    .social-bar-ad {
        max-height: 80px;
    }

    body {
        padding-bottom: 80px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   BANNER AD (468x60)
   ═══════════════════════════════════════════════════════════════ */

.ad-banner-468x60 {
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ad-banner-468x60 .ad-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    margin-top: 0.5rem;
}

/* Responsive banner */
@media (max-width: 500px) {
    .ad-banner-468x60 {
        padding: 0.75rem;
    }

    .ad-banner-468x60 .ad-content {
        overflow-x: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   NATIVE BANNER AD
   ═══════════════════════════════════════════════════════════════ */

.ad-native-banner {
    margin: 2rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

.ad-native-banner .ad-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .ad-native-banner {
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AD LABELS
   ═══════════════════════════════════════════════════════════════ */

.ad-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   AD SECTION DIVIDERS
   ═══════════════════════════════════════════════════════════════ */

.ad-section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.ad-section.inline {
    margin: 1.5rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE AD CONTAINERS
   ═══════════════════════════════════════════════════════════════ */

.ad-container-responsive {
    width: 100%;
    max-width: 728px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .ad-container-responsive {
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PREVENT LAYOUT SHIFT
   ═══════════════════════════════════════════════════════════════ */

.ad-placeholder {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}

.ad-placeholder::before {
    content: 'Advertisement';
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   AD LOADING STATES
   ═══════════════════════════════════════════════════════════════ */

.ad-loading {
    opacity: 0.6;
    animation: adPulse 1.5s ease-in-out infinite;
}

@keyframes adPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.3;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ENSURE ADS DON'T BREAK LAYOUT
   ═══════════════════════════════════════════════════════════════ */

[id^="container-"] {
    max-width: 100%;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   PRINT: HIDE ADS
   ═══════════════════════════════════════════════════════════════ */

@media print {

    .social-bar-ad,
    .ad-banner-468x60,
    .ad-native-banner,
    .ad-section {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}