/* ============================================================
   Ment Event — KVKK çerez onay yönetimi
   Bağımsız; harici kütüphane yok. Tema değişkenlerini kullanır,
   açık/koyu temaya uyum sağlar.
   ============================================================ */

.cc-root {
    --cc-bg: #ffffff;
    --cc-fg: #16202b;
    --cc-muted: #5b6672;
    --cc-border: #e2e6ea;
    --cc-accent: #0C1622;
    --cc-accent-fg: #ffffff;
    --cc-shadow: 0 18px 50px rgba(12, 22, 34, .18);
}
[tg-theme=dark] .cc-root {
    --cc-bg: #16202b;
    --cc-fg: #eef2f5;
    --cc-muted: #a8b3bf;
    --cc-border: #273341;
    --cc-accent: #ffffff;
    --cc-accent-fg: #0C1622;
    --cc-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

.cc-root,
.cc-root * { box-sizing: border-box; }

/* ---------- Alt banner ---------- */
.cc-banner {
    position: fixed;
    z-index: 99998;
    left: 16px; right: 16px; bottom: 16px;
    max-width: 980px;
    margin: 0 auto;
    background: var(--cc-bg);
    color: var(--cc-fg);
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    box-shadow: var(--cc-shadow);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: var(--tg-body-font-family, system-ui, sans-serif);
    transform: translateY(140%);
    opacity: 0;
    transition: transform .38s cubic-bezier(.2,.8,.25,1), opacity .38s ease;
}
.cc-banner.is-open { transform: translateY(0); opacity: 1; }

.cc-banner__text { flex: 1 1 auto; min-width: 0; }
.cc-banner__title {
    font-family: var(--tg-heading-font-family, inherit);
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--cc-fg);
    line-height: 1.3;
}
.cc-banner__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-muted);
}
.cc-banner__desc a { color: var(--cc-fg); text-decoration: underline; text-underline-offset: 2px; }

.cc-banner__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Butonlar ----------
   KVKK/GDPR: kabul ve ret aynı görsel ağırlıkta olmalı. */
.cc-btn {
    appearance: none;
    border: 1px solid var(--cc-border);
    background: transparent;
    color: var(--cc-fg);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 13px 20px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.cc-btn:hover { background: var(--cc-border); }
.cc-btn:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
.cc-btn--primary,
.cc-btn--secondary {
    background: var(--cc-accent);
    color: var(--cc-accent-fg);
    border-color: var(--cc-accent);
    min-width: 132px;
    text-align: center;
}
.cc-btn--secondary { background: transparent; color: var(--cc-fg); border-color: var(--cc-fg); }
.cc-btn--primary:hover { opacity: .88; background: var(--cc-accent); }
.cc-btn--secondary:hover { background: var(--cc-fg); color: var(--cc-bg); }
.cc-btn--link {
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 13px 8px;
    font-weight: 600;
    color: var(--cc-muted);
}
.cc-btn--link:hover { background: transparent; color: var(--cc-fg); }

/* ---------- Ayarlar penceresi ---------- */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cc-modal.is-open { display: flex; }
.cc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 20, .55);
    backdrop-filter: blur(2px);
}
.cc-modal__panel {
    position: relative;
    background: var(--cc-bg);
    color: var(--cc-fg);
    border-radius: 16px;
    box-shadow: var(--cc-shadow);
    width: min(620px, 100%);
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--tg-body-font-family, system-ui, sans-serif);
}
.cc-modal__head {
    padding: 24px 26px 16px;
    border-bottom: 1px solid var(--cc-border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.cc-modal__title {
    font-family: var(--tg-heading-font-family, inherit);
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    flex: 1 1 auto;
    color: var(--cc-fg);
}
.cc-modal__close {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--cc-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.cc-modal__close:hover { color: var(--cc-fg); }
.cc-modal__body { padding: 8px 26px 20px; overflow-y: auto; }
.cc-modal__intro { font-size: 14px; line-height: 1.65; color: var(--cc-muted); margin: 14px 0 20px; }
.cc-modal__foot {
    padding: 16px 26px 22px;
    border-top: 1px solid var(--cc-border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ---------- Kategori satırı ---------- */
.cc-cat {
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.cc-cat__head { display: flex; align-items: center; gap: 14px; }
.cc-cat__name {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    flex: 1 1 auto;
    color: var(--cc-fg);
}
.cc-cat__desc { font-size: 13.5px; line-height: 1.6; color: var(--cc-muted); margin: 8px 0 0; }
.cc-cat__always { font-size: 12.5px; font-weight: 700; color: var(--cc-muted); text-transform: uppercase; letter-spacing: .04em; }

/* Anahtar */
.cc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch__track {
    position: absolute; inset: 0;
    background: var(--cc-border);
    border-radius: 999px;
    transition: background-color .2s ease;
    pointer-events: none;
}
.cc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--cc-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,.28);
    transition: transform .2s ease;
}
.cc-switch input:checked + .cc-switch__track { background: var(--cc-accent); }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-switch__track { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

/* ---------- Onay bekleyen gömülü içerik (harita vb.) ---------- */
.cc-embed {
    position: relative;
    border: 1px dashed var(--cc-border);
    border-radius: 12px;
    background: var(--cc-bg);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
}
.cc-embed__inner { max-width: 460px; }
.cc-embed__title { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--cc-fg); }
.cc-embed__desc { font-size: 14px; line-height: 1.6; color: var(--cc-muted); margin: 0 0 18px; }
.cc-embed iframe { width: 100%; border: 0; display: block; border-radius: 12px; }
.cc-embed.is-loaded { display: block; padding: 0; border: 0; min-height: 0; }

/* ---------- Footer'daki yeniden açma bağlantısı ---------- */
.cc-reopen {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}
.cc-reopen:hover { text-decoration: underline; }

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
    .cc-banner { flex-direction: column; align-items: stretch; gap: 18px; padding: 20px; }
    .cc-banner__actions { flex-direction: row; }
    .cc-btn--primary, .cc-btn--secondary { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 575.98px) {
    .cc-banner { left: 10px; right: 10px; bottom: 10px; padding: 18px 16px; }
    .cc-banner__actions { flex-direction: column; align-items: stretch; }
    .cc-btn { width: 100%; }
    .cc-modal { padding: 0; align-items: flex-end; }
    .cc-modal__panel { border-radius: 16px 16px 0 0; max-height: 92vh; }
    .cc-modal__foot .cc-btn { flex: 1 1 100%; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    .cc-banner { transition: none; }
}
