/* ==========================================================================
   ADS.CSS - AdInjector Formats & Overlays
   ========================================================================== */

/* ─── BASE CONTAINER ─── */
.ad-container {
    display: block;
    position: relative;
    margin: var(--gutter-2x) 0;
    clear: both;
}

/* Strip margins if it's the very first or last child */
.ad-container:first-child { margin-top: 0; }
.ad-container:last-child { margin-bottom: 0; }

/* ─── AD LABEL (ANNONS / BETALT) ─── */
.ad-label {
    display: inline-block;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: calc(var(--gutter) / 2);
    font-family: var(--font-mono, monospace);
}

.ad-label--absolute {
    position: absolute;
    top: var(--gutter);
    right: var(--gutter);
    background: var(--brand-paper);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ─── FORMAT: NATIVE BLOCK ─── */
.ad-native {
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-native:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ad-native__image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    background: var(--brand-line);
}

.ad-native__content {
    padding: var(--gutter-1-5x);
}

.ad-native__title {
    font-family: var(--font-display, sans-serif);
    font-size: var(--text-xl);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.ad-native__body {
    font-family: var(--font-body, serif);
    font-size: var(--text-base);
    line-height: 1.5;
    margin: 0;
    color: var(--brand-text-muted);
}

/* ─── FORMAT: QUOTE CARD (SPONSORED) ─── */
.ad-quote {
    padding: var(--gutter-1-5x);
    border-left: 4px solid var(--brand-primary);
    background: var(--brand-surface);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: var(--gutter-2x) calc(var(--gutter) * -1); /* Slight bleed */
}

@media (min-width: 720px) {
    .ad-quote {
        margin: var(--gutter-2x) -2rem; /* Bleed out of text column on desktop */
    }
}

.ad-quote blockquote {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1.25rem, 3vw, 2rem);
    line-height: 1.3;
    font-weight: 700;
    border: none;
    padding: 0;
    margin: 0 0 1rem 0;
    color: var(--brand-text);
}

.ad-quote cite {
    display: block;
    font-style: normal;
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-primary);
}

/* ─── FORMAT: PAGE TAKEOVER (OVERLAY) ─── */
.ad-takeover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: var(--brand-paper);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--gutter-2x);
}

.ad-takeover__close {
    position: absolute;
    top: var(--gutter-2x);
    right: var(--gutter-2x);
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--text-xl);
    color: var(--brand-text);
}

.ad-takeover__close:hover {
    background: var(--brand-line);
}

.ad-takeover__content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

/* ─── FORMAT: STICKY TOP BAR ─── */
.ad-sticky-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 9000;
    background: var(--brand-primary);
    color: var(--brand-paper);
    text-align: center;
    padding: 0.75rem var(--gutter);
    font-family: var(--font-sans, sans-serif);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Offset body when sticky top is active */
body.has-sticky-ad {
    padding-top: 48px;
}
