/* 
 * Theme Name: Omnitool
 * Description: Ad slot positioning and styling
 */

.ad-slot {
    text-align: center;
    overflow: hidden;
    position: relative;
    background: var(--color-surface-input);
    border: 1px solid var(--color-surface-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ad-slot:empty {
    display: none;
}

.ad-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
    letter-spacing: 1px;
}

/* Header Ad */
.ad-slot--header {
    width: 100%;
    max-width: 728px;
    max-height: 90px;
    margin: var(--space-4) auto;
}

/* Sidebar Ad */
.ad-slot--sidebar {
    width: 300px;
    min-height: 250px;
    position: sticky;
    top: calc(80px + var(--space-4)); /* approx header height + spacing */
    margin: 0 auto var(--space-6);
}

/* Native/In-Content Ad */
.ad-slot--native {
    margin: var(--space-8) 0;
    padding: var(--space-4);
    border-top: 1px dashed var(--color-surface-border);
    border-bottom: 1px dashed var(--color-surface-border);
    border-left: none;
    border-right: none;
    border-radius: 0;
    background: transparent;
}

/* Processing Interstitial Ad */
.ad-slot--processing {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(30, 31, 38, 0.95);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base);
}
.ad-slot--processing.is-active {
    opacity: 1;
    visibility: visible;
}
.ad-slot--processing .ad-content {
    width: 728px;
    height: 90px;
    background: #000;
    margin-bottom: var(--space-6);
}
.ad-slot--processing .ad-close {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-surface-border);
    color: var(--color-text-primary);
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--text-sm);
    animation: fadeIn 0.5s ease 5s forwards;
    opacity: 0;
    pointer-events: none;
}
.ad-slot--processing .ad-close.is-ready {
    opacity: 1;
    pointer-events: auto;
}

/* Media Queries */
@media (max-width: 1024px) {
    .ad-slot--sidebar {
        display: none; /* Hide sidebar ads on smaller screens if sidebar drops below */
    }
}

@media (max-width: 768px) {
    .ad-slot--header {
        max-width: 320px;
        max-height: 50px;
    }
    
    .ad-slot--processing .ad-content {
        width: 320px;
        height: 50px;
    }
}
