/**
 * AdBlock CTA — Glassmorphism + Neon Turkuaz vurgu
 * FB-557 — 2026-05-10 — Sunai
 *
 * Tasarim: FBPortal v2 tema parite (sade tema layout.php paletinden ilham)
 *  - cam (glassmorphism): backdrop-filter blur + saydam beyaz/siyah bg
 *  - neon vurgu: #00d4fc cyan + #8b5cf6 mor gradient
 *  - Inter font (layout.php zaten yuklu)
 *  - prefers-reduced-motion: opacity-only fade (transform yok)
 *  - z-index 9990 (header 9995, modal 10000 altinda guvenli)
 *  - mobile: max-width 360px + bottom 16px (panel ekranin %30 ucu gecmez)
 */

/* ---- Sarmal (no layout sift) ---- */
.fb-adb-sarmal {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9990;
    pointer-events: none; /* sadece child element'ler tikla */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #0f172a;
}

/* ---- Rozet (acilis ikonu) ---- */
.fb-adb-rozet {
    pointer-events: auto;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 212, 252, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: #0891b2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
    will-change: transform;
}
.fb-adb-rozet:hover,
.fb-adb-rozet:focus-visible {
    transform: scale(1.08);
    box-shadow:
        0 6px 20px rgba(8, 145, 178, 0.35),
        0 0 0 2px rgba(0, 212, 252, 0.55);
    outline: none;
}
.fb-adb-rozet.fb-adb-gizle {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}

/* ---- Pulse animation (dikkat cek) ---- */
.fb-adb-rozet::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 252, 0.5);
    animation: fb-adb-pulse 2s ease-out infinite;
    pointer-events: none;
}
@keyframes fb-adb-pulse {
    0%   { transform: scale(0.95); opacity: 1; }
    100% { transform: scale(1.45); opacity: 0; }
}

/* ---- Panel ---- */
.fb-adb-panel {
    pointer-events: auto;
    position: absolute;
    bottom: 0;
    right: 0;
    width: min(360px, calc(100vw - 32px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-radius: 16px;
    padding: 24px 22px 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 212, 252, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transform-origin: bottom right;
    transition:
        opacity .28s ease,
        transform .32s cubic-bezier(.34,1.56,.64,1);
}
.fb-adb-panel.fb-adb-acik {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ---- Panel iceren ---- */
.fb-adb-x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.fb-adb-x:hover, .fb-adb-x:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    outline: none;
}

.fb-adb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4fc 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.fb-adb-baslik {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.fb-adb-metin {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.55;
    text-align: center;
    color: #475569;
}

.fb-adb-butonlar {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.fb-adb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    transition: transform .12s, box-shadow .2s, background .2s;
    line-height: 1;
}
.fb-adb-btn-primary {
    background: linear-gradient(135deg, #00d4fc 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.32);
}
.fb-adb-btn-primary:hover, .fb-adb-btn-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
    outline: none;
}
.fb-adb-btn-ghost {
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.fb-adb-btn-ghost:hover, .fb-adb-btn-ghost:focus-visible {
    background: rgba(15, 23, 42, 0.08);
    outline: none;
}

.fb-adb-mini {
    margin: 12px 0 0;
    font-size: 11px;
    text-align: center;
    color: #94a3b8;
}

/* ---- Dark tema (FBPortal v2 data-theme=dark) ---- */
html[data-theme="dark"] .fb-adb-rozet {
    background: rgba(15, 23, 42, 0.92);
    color: #00d4fc;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 212, 252, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .fb-adb-panel {
    background: rgba(15, 23, 42, 0.94);
    color: #e2e8f0;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 212, 252, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .fb-adb-baslik { color: #f1f5f9; }
html[data-theme="dark"] .fb-adb-metin  { color: #cbd5e1; }
html[data-theme="dark"] .fb-adb-mini   { color: #64748b; }
html[data-theme="dark"] .fb-adb-x      { color: #94a3b8; }
html[data-theme="dark"] .fb-adb-x:hover{ background: rgba(255,255,255,0.08); color: #f1f5f9; }
html[data-theme="dark"] .fb-adb-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .fb-adb-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---- Mobile (320px+) ---- */
@media (max-width: 480px) {
    .fb-adb-sarmal { bottom: 12px; right: 12px; left: 12px; }
    .fb-adb-rozet  { left: auto; right: 0; }
    .fb-adb-panel  {
        right: 0;
        left: auto;
        width: calc(100vw - 24px);
        max-width: 360px;
        padding: 20px 18px 16px;
    }
    .fb-adb-baslik { font-size: 16px; }
    .fb-adb-metin  { font-size: 13px; }
}

/* ---- Tablet/desktop: 2 buton yan yana ---- */
@media (min-width: 481px) {
    .fb-adb-butonlar { flex-direction: row; }
    .fb-adb-btn { flex: 1; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .fb-adb-rozet,
    .fb-adb-panel,
    .fb-adb-btn,
    .fb-adb-x { transition: opacity .15s linear; }
    .fb-adb-rozet:hover,
    .fb-adb-btn-primary:hover { transform: none; }
    .fb-adb-rozet::before { animation: none; opacity: 0; }
    .fb-adb-panel { transform: none; }
    .fb-adb-panel.fb-adb-acik { transform: none; }
}

/* ---- AdSense Policy: icerik akisini engellememe garantisi ----
 * Sticky bottom-right elementi sayfa govdesine pointer-events: none
 * sarmal ile baglanmis. Sadece rozet+panel cocuklari pointer-events: auto.
 * Bu sayede ne kullanici scroll'a engel ne metne erisim engeli.
 * AdSense Publisher Policy / Ad Experience Standards uyumu sağlar.
 */
