/* ============================================================================
 * adsense.css — Batch 4.12
 *
 * Styles for ad slot containers and the GDPR consent banner.
 * Goal: ads feel intentional and integrated, not bolted-on or spammy.
 * ============================================================================ */

/* ============================================================
 * Ad slot container
 * ============================================================ */

.ad-slot {
    margin: var(--sp-5, 20px) 0;
    padding: 14px;
    background: rgba(20, 30, 50, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    min-height: 110px;
    transition: opacity 0.3s ease;
}

.ad-slot__label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.32);
    margin-bottom: 10px;
    text-align: center;
}

.ad-slot ins.adsbygoogle {
    display: block;
    min-height: 80px;
    background: transparent;
}

/* Placeholder state (Google still approving, or PUBLISHER_ID not set yet) */
.ad-slot--placeholder {
    background: linear-gradient(
        135deg,
        rgba(20, 30, 50, 0.20) 0%,
        rgba(15, 23, 42, 0.20) 100%
    );
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.08);
}

.ad-slot__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 16px;
    color: rgba(255, 255, 255, 0.30);
    font-size: 0.875rem;
    font-style: italic;
    text-align: center;
}

.ad-slot__placeholder-icon {
    font-size: 1.6rem;
    opacity: 0.5;
    animation: ad-placeholder-pulse 3s ease-in-out infinite;
}

@keyframes ad-placeholder-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .ad-slot__placeholder-icon { animation: none; }
}

/* ============================================================
 * House ads rotator (first-party banners shown inside .ad-slot)
 * The outer .ad-slot provides padding 14px + border-radius 14px.
 * Add/remove banners by editing HOUSE_ADS_HTML in /js/adsense.js.
 * ============================================================ */

.bq-ad-rotator { position: relative; min-height: 80px; }
.bq-ad-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.6s ease;
}
.bq-ad-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.bq-ad-slide > * { height: 100%; }

/* Banner base (gold = Big Quiniela brand, default) */
.bq-ad {
    position: relative; display: flex; align-items: center; gap: 14px;
    height: 100%; min-height: 80px; padding: 14px 16px; border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.16); overflow: hidden;
    box-sizing: border-box; font-family: inherit; color: #fff;
    text-decoration: none; cursor: pointer;
    background:
        radial-gradient(ellipse at 12% 50%, rgba(251, 191, 36, 0.18) 0%, transparent 58%),
        linear-gradient(135deg, #0a1628 0%, #142036 100%);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    animation: bq-ad-in 0.45s ease both;
}
.bq-ad:hover {
    transform: translateY(-1px);
    border-color: rgba(251, 191, 36, 0.38);
    box-shadow: 0 10px 28px -10px rgba(251, 191, 36, 0.28);
}
.bq-ad__icon {
    flex: 0 0 auto; width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid rgba(251, 191, 36, 0.32);
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.18);
}
.bq-ad__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bq-ad__title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700; line-height: 1.2;
    letter-spacing: -0.01em; color: #fff;
}
.bq-ad__badge {
    padding: 2px 7px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
    color: #1a1408; background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 5px; line-height: 1.4;
}
.bq-ad__sub {
    font-size: 12.5px; line-height: 1.3; color: rgba(255, 255, 255, 0.72);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bq-ad__cta {
    flex: 0 0 auto; padding: 9px 16px; border-radius: 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a1408; font-size: 13px; font-weight: 700; white-space: nowrap;
    transition: filter 0.2s ease;
}
.bq-ad:hover .bq-ad__cta { filter: brightness(1.08); }
@keyframes bq-ad-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Variant: JeroGames (terracotta) */
.bq-ad--jero {
    border-color: rgba(225, 97, 58, 0.18);
    background:
        radial-gradient(ellipse at 12% 50%, rgba(225, 97, 58, 0.20) 0%, transparent 58%),
        linear-gradient(135deg, #0a1628 0%, #142036 100%);
}
.bq-ad--jero:hover { border-color: rgba(225, 97, 58, 0.40); box-shadow: 0 10px 28px -10px rgba(225, 97, 58, 0.30); }
.bq-ad--jero .bq-ad__icon {
    background: linear-gradient(135deg, rgba(225, 97, 58, 0.24) 0%, rgba(193, 68, 14, 0.10) 100%);
    border-color: rgba(225, 97, 58, 0.34); box-shadow: 0 0 22px rgba(225, 97, 58, 0.20);
}
.bq-ad--jero .bq-ad__badge,
.bq-ad--jero .bq-ad__cta { background: linear-gradient(135deg, #e2613a 0%, #c1440e 100%); color: #fff5ef; }

/* Variant: Shesh Besh (wood + vanilla/black checkers) */
.bq-ad--sheshbesh {
    border-color: rgba(199, 154, 94, 0.18);
    background:
        radial-gradient(ellipse at 12% 50%, rgba(199, 154, 94, 0.20) 0%, transparent 58%),
        linear-gradient(135deg, #0a1628 0%, #142036 100%);
}
.bq-ad--sheshbesh:hover { border-color: rgba(199, 154, 94, 0.42); box-shadow: 0 10px 28px -10px rgba(199, 154, 94, 0.30); }
.bq-ad--sheshbesh .bq-ad__icon {
    position: relative;
    background: linear-gradient(135deg, rgba(199, 154, 94, 0.22) 0%, rgba(139, 94, 52, 0.10) 100%);
    border-color: rgba(199, 154, 94, 0.34); box-shadow: 0 0 22px rgba(199, 154, 94, 0.18);
}
.bq-ad--sheshbesh .bq-ad__badge,
.bq-ad--sheshbesh .bq-ad__cta { background: linear-gradient(135deg, #a87a4a 0%, #7c5530 100%); color: #f8efdc; }
.bq-sb-pieces { position: relative; width: 40px; height: 40px; }
.bq-sb-chk { position: absolute; width: 20px; height: 20px; border-radius: 50%; }
.bq-sb-chk--light { top: 6px; left: 4px; background: radial-gradient(circle at 35% 30%, #fff8ee 0%, #e6d3b3 100%); box-shadow: inset 0 -2px 3px rgba(0,0,0,0.18), 0 1px 2px rgba(0,0,0,0.3); }
.bq-sb-chk--dark  { top: 14px; left: 16px; background: radial-gradient(circle at 35% 30%, #4a4646 0%, #131313 100%); box-shadow: inset 0 -2px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4); }

/* Narrow phones */
@media (max-width: 460px) {
    .bq-ad { gap: 10px; padding: 12px; }
    .bq-ad__icon { width: 42px; height: 42px; font-size: 20px; border-radius: 10px; }
    .bq-ad__title { font-size: 14px; }
    .bq-ad__sub { font-size: 11.5px; }
    .bq-ad__cta { padding: 8px 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .bq-ad-slide { transition: none; }
    .bq-ad { transition: none; animation: none; }
}

/* ============================================================
 * GDPR consent banner
 * ============================================================ */

.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9500;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));

    background: linear-gradient(135deg,
        rgba(10, 22, 40, 0.98) 0%,
        rgba(15, 32, 58, 0.98) 100%);
    border-top: 1px solid rgba(251, 191, 36, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);

    display: flex;
    flex-direction: column;
    gap: 14px;

    animation: gdpr-slide-up 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gdpr-slide-up {
    from { transform: translateY(110%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.gdpr-banner--leaving {
    animation: gdpr-slide-down 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes gdpr-slide-down {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(110%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .gdpr-banner, .gdpr-banner--leaving {
        animation: none;
    }
}

.gdpr-banner__content {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.gdpr-banner__icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.gdpr-banner__text {
    flex: 1;
    min-width: 0;
}

.gdpr-banner__title {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.gdpr-banner__body {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.875rem;
    line-height: 1.5;
}

.gdpr-banner__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.gdpr-banner__btn {
    padding: 11px 20px;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
    white-space: nowrap;
}

.gdpr-banner__btn--primary {
    background: linear-gradient(135deg,
        rgba(251, 191, 36, 1) 0%,
        rgba(245, 158, 11, 1) 100%);
    color: #1a1408;
}

.gdpr-banner__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4);
}

.gdpr-banner__btn--primary:active {
    transform: translateY(0);
}

.gdpr-banner__btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.gdpr-banner__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* Tablet+ refinement: floating card */
@media (min-width: 720px) {
    .gdpr-banner {
        left: 24px;
        right: 24px;
        bottom: 24px;
        max-width: 680px;
        margin: 0 auto;
        border-radius: 18px;
        border: 1px solid rgba(251, 191, 36, 0.30);
        flex-direction: row;
        align-items: center;
        padding: 18px 22px;
    }
    .gdpr-banner__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .gdpr-banner__btn {
        min-width: 140px;
    }
}
