/* Advertising Styles */

.ad-container {
    display: block;
    margin: 0 auto;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.ad-container:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ad-image {
    display: block;
    width: 100%;
    height: auto;
    border: none;
}

/* Ad Size Classes */
.ad-300x250 {
    width: 300px;
    height: 250px;
}

.ad-300x600 {
    width: 300px;
    height: 600px;
}

.ad-728x90 {
    width: 728px;
    height: 90px;
}

.ad-160x600 {
    width: 160px;
    height: 600px;
}

/* Default Ad Placeholder */
.default-ad {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.ad-placeholder {
    text-align: center;
    color: #6b7280;
}

.ad-placeholder svg {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ad-728x90 {
        width: 100%;
        max-width: 320px;
        height: 50px;
    }
    
    .ad-300x600 {
        width: 100%;
        max-width: 300px;
        height: 300px;
    }
    
    .ad-160x600 {
        display: none; /* Hide skyscraper on mobile */
    }
}

/* Ad Space Styling for existing pages */
.ad-space {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.ad-space:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Ad Labels */
.ad-label {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Ad Performance Indicators */
.ad-performance {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ad-container:hover .ad-performance {
    opacity: 1;
}

/* Loading State */
.ad-loading {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.ad-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #169b62;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ad Error State */
.ad-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Ad Success State */
.ad-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}
