/* Gemeinsame Anzeigen-Styles (Dialog, Slots, Preview) */

:root { --green: #4caf50; --bot-border: #ddd; --muted: #888; }

/* in-chat ad */
.ad-slot-wrap { margin-top: 20px; text-align: center; }
.ad-label { margin: 0 0 4px; font-size: 10px; color: var(--muted); }
.ad-slot { width: 100%; min-width: 300px; min-height: 280px; }

/* ---------- rewarded offer dialog ---------- */
.offer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .35);
}

.offer {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 28px 20px 20px;
    border: 1px solid var(--bot-border);
    border-radius: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.offer h2 { margin: 0 0 12px; font-size: 20px; }
.offer p { margin: 0 0 20px; font-size: 16px; }
.offer .offer-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

.offer-cta {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 6px;
    background: #7a7a7a;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.offer-close {
    position: absolute;
    top: 6px;
    right: 10px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
}

/* ---------- Ad-Preview (nur lokal) ---------- */
.ad-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed #b0b0b0;
    background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f0f0f0 10px, #f0f0f0 20px);
    color: #777;
    font-size: 13px;
    text-align: center;
}
.ad-preview strong { font-size: 15px; letter-spacing: 2px; }
.ad-preview--inline { width: 100%; min-height: 250px; border-radius: 6px; }
.ad-preview--anchor { position: fixed; top: 0; left: 0; right: 0; height: 50px; z-index: 900; flex-direction: row; background: #f0f0f0; }
.ad-preview--full { position: fixed; inset: 0; z-index: 1100; border: 0; background: #222; color: #ccc; }
.ad-preview--full .offer-cta { width: auto; min-width: 200px; margin-top: 24px; }
.ad-preview--full .offer-cta:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Lade-Overlay (nur mit ads.loader: true) ---------- */
html.ad-loading, html.ad-loading body { overflow: hidden; }
.ad-loader { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; background: #fff; transition: opacity .3s ease; }
.ad-loader--out { opacity: 0; pointer-events: none; }
.ad-loader-spin { width: 72px; height: 72px; border: 6px solid #e5e7eb; border-top-color: #374151; border-radius: 50%; animation: ad-spin 1s linear infinite; }
@keyframes ad-spin { to { transform: rotate(360deg); } }

/* ---------- Quiz-Dialog ---------- */
.offer-backdrop--quiz { background: rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.offer--quiz { min-height: 340px; padding: 44px 20px 24px; }
.offer--quiz .offer-cta { background: #1e293b; font-weight: 600; }
.quiz-progress { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: #e5e7eb; overflow: hidden; border-radius: 14px 14px 0 0; }
.quiz-bar { height: 100%; background: #1e293b; transition: width .3s ease; }
.quiz-opt { display: block; width: 100%; margin: 0 0 12px; padding: 16px; border: 0; border-radius: 6px; background: #1e293b; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.quiz-body h2 { margin: 0 0 28px; font-size: 20px; font-weight: 500; color: #4b5563; }
.quiz-dots { display: flex; justify-content: center; gap: 6px; margin: 24px 0 16px; }
.quiz-dots span { width: 10px; height: 10px; border-radius: 50%; background: #374151; animation: quiz-pulse 1s infinite ease-in-out; }
.quiz-dots span:nth-child(2) { animation-delay: .2s; }
.quiz-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes quiz-pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
