/* ========================================
   ADSTERRA ADS STYLES
   Custom styles for ad placements
   ======================================== */

/* ========== AD CONTAINERS ========== */
.ad-container {
    margin: 20px 0;
    padding: 10px;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* ========== TOP BANNER AD ========== */
.ad-top-banner {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}

body.dark-mode .ad-top-banner {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-dark);
}

/* ========== SIDEBAR AD (Desktop only) ========== */
.ad-sidebar {
    position: sticky;
    top: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

body.dark-mode .ad-sidebar {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
}

@media (max-width: 991px) {
    .ad-sidebar {
        display: none; /* Hide on mobile */
    }
}

/* ========== NATIVE AD (Between tools) ========== */
.ad-native {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

body.dark-mode .ad-native {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

/* ========== BOTTOM BANNER AD ========== */
.ad-bottom-banner {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: 40px;
}

body.dark-mode .ad-bottom-banner {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-dark);
}

/* ========== SOCIAL BAR (Sticky bottom) ========== */
.ad-social-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.15);
    border-top: 1px solid rgba(0,0,0,0.1);
    z-index: 999;
    padding: 8px 15px;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body.dark-mode .ad-social-bar {
    background: rgba(51, 65, 85, 0.95);
    border-top: 1px solid var(--border-dark);
}

.ad-social-bar .ad-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Close button for social bar */
.ad-social-bar .close-ad {
    position: absolute;
    top: -5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    transition: all 0.2s ease;
}

.ad-social-bar .close-ad:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .ad-social-bar {
        padding: 6px 10px;
    }
    
    .ad-social-bar .close-ad {
        width: 20px;
        height: 20px;
        font-size: 11px;
        top: -3px;
        right: 3px;
    }
}

/* ========== IN-FEED AD (In tools grid) ========== */
.ad-infeed {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    color: white;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-infeed .ad-label {
    color: rgba(255,255,255,0.8);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .ad-top-banner,
    .ad-bottom-banner {
        padding: 10px 0;
    }
    
    .ad-container {
        margin: 15px 0;
    }
    
    .ad-social-bar {
        padding: 5px;
    }
}

/* ========== AD VISIBILITY ANIMATION ========== */
.ad-container {
    opacity: 0;
    animation: fadeInAd 0.5s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInAd {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
