/**
 * Ad Management Styles
 * Responsive containers and styling for all ad types
 */

/* Ad Container - Responsive wrapper */
.ad-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: 20px auto;
    text-align: center;
}

.ad-container.ad-responsive {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

/* Ad Slot Wrapper */
.ad-slot-wrapper {
    width: 100%;
    clear: both;
}

/* Ad Images */
.ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-link:hover .ad-image {
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Ad Label */
.ad-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
    opacity: 0.7;
}

/* Text Ads */
.ad-text-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.ad-text-link:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.ad-text-content {
    text-align: center;
}

.ad-title {
    display: block;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}

.ad-description {
    font-size: 0.9em;
    color: #666;
}

/* Ad Blocker Detection Banner */
.ad-blocker-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #333;
    padding: 15px 20px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.ad-blocker-notice.show {
    display: block;
    animation: slideUp 0.3s ease;
}

.ad-blocker-notice .close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

.ad-blocker-notice .close-btn:hover {
    opacity: 1;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .ad-container {
        padding: 10px 0;
        margin: 15px auto;
    }
    
    .ad-image {
        border-radius: 4px;
    }
    
    .ad-text-link {
        padding: 12px 15px;
    }
    
    .ad-title {
        font-size: 1em;
    }
    
    .ad-description {
        font-size: 0.85em;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .ad-container {
        margin: 10px auto;
    }
}

/* Ensure third-party ads are responsive */
.ad-wrapper iframe,
.ad-wrapper ins,
.ad-wrapper img {
    max-width: 100% !important;
    height: auto;
}

/* AdSense specific */
.ad-wrapper ins.adsbygoogle {
    width: 100%;
    display: block;
}
