/* Cookie Consent Banner & Modal — scoped to .cc-* sınıfları */

#cc-banner, #cc-modal, #cc-change-btn {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}
.cc-banner *, .cc-banner *::before, .cc-banner *::after,
.cc-modal *,  .cc-modal *::before,  .cc-modal *::after { box-sizing: border-box; }

/* ====== Banner ====== */
.cc-banner {
    position: fixed;
    z-index: 99998;
    left: 0; right: 0;
    padding: 16px 20px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    animation: cc-slide-in 0.4s ease-out;
}
.cc-banner.cc-pos-bottom { bottom: 0; }
.cc-banner.cc-pos-top    { top: 0; box-shadow: 0 4px 24px rgba(0,0,0,0.15); }
.cc-banner.cc-pos-bottom-left,
.cc-banner.cc-pos-bottom-right {
    bottom: 16px; max-width: 460px; left: auto; right: 16px;
    border-radius: 12px;
}
.cc-banner.cc-pos-bottom-left { right: auto; left: 16px; }

.cc-banner.cc-theme-dark  { background: #0f172a; color: #e2e8f0; }
.cc-banner.cc-theme-light { background: #ffffff; color: #0f172a; border-top: 1px solid #e5e7eb; }
.cc-banner.cc-theme-light .cc-title { color: #0f172a; }
.cc-banner.cc-theme-light .cc-body { color: #334155; opacity: 1; }
.cc-banner.cc-theme-light .cc-body a { color: #9a3412; font-weight: 800; }
.cc-banner.cc-theme-light .cc-banner-actions .cc-dns-link { color: #b91c1c; opacity: 1; font-weight: 700; }
.cc-banner.cc-theme-light .cc-gpc-notice { background: #fff7ed; color: #9a3412; }
.cc-banner.cc-theme-light .cc-btn-secondary { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
.cc-banner.cc-theme-light .cc-btn-secondary:hover { background: #e2e8f0; }
.cc-banner.cc-theme-light .cc-btn-link { color: #334155; }

.cc-banner-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.cc-pos-bottom-left  .cc-banner-inner,
.cc-pos-bottom-right .cc-banner-inner { flex-direction: column; align-items: stretch; gap: 12px; }

.cc-banner-text { flex: 1 1 360px; min-width: 0; }
.cc-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.cc-body  { font-size: 13px; line-height: 1.5; opacity: 0.9; }
.cc-body a { color: #9a3412; text-decoration: underline; font-weight: 800; }

.cc-gpc-notice { margin-top: 8px; font-size: 12px; opacity: 0.85; padding: 6px 10px; background: rgba(249,115,22,0.12); border-radius: 6px; }
.cc-gpc-notice i { color: #f97316; font-style: normal; }

.cc-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cc-banner-actions .cc-dns-link { font-size: 12px; color: inherit; opacity: 0.8; text-decoration: underline; margin-right: 4px; }

.cc-btn {
    border: none; padding: 10px 18px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.cc-btn:active { transform: scale(0.98); }
.cc-btn-primary { background: #facc15; color: #111827; }
.cc-btn-primary:hover { background: #ea580c; color: #fff; }
.cc-btn-secondary { background: rgba(255,255,255,0.1); color: inherit; border: 1px solid rgba(255,255,255,0.2); }
.cc-theme-light .cc-btn-secondary { background: #f1f5f9; color: #0f172a; border-color: #e2e8f0; }
.cc-btn-link { background: transparent; color: inherit; text-decoration: underline; padding: 6px 8px; }

@keyframes cc-slide-in {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* ====== Modal (customize) ====== */
.cc-modal { position: fixed; inset: 0; z-index: 99999; }
.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.6); }
.cc-modal-panel {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(92vw, 560px); max-height: 88vh; overflow-y: auto;
    background: #fff; color: #0f172a; border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}
.cc-theme-dark .cc-modal-panel { background: #0f172a; color: #e2e8f0; }
.cc-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.cc-theme-dark .cc-modal-head { border-bottom-color: rgba(255,255,255,0.1); }
.cc-modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.cc-modal-close { background: transparent; border: none; font-size: 24px; cursor: pointer; color: inherit; line-height: 1; padding: 4px 8px; }
.cc-modal-body { padding: 18px 22px; font-size: 14px; line-height: 1.5; }
.cc-modal-foot {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 14px 22px; border-top: 1px solid rgba(0,0,0,0.08); flex-wrap: wrap;
}
.cc-theme-dark .cc-modal-foot { border-top-color: rgba(255,255,255,0.1); }

.cc-cat-list { margin-top: 12px; }
.cc-cat-row {
    display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cc-theme-dark .cc-cat-row { border-bottom-color: rgba(255,255,255,0.08); }
.cc-cat-info { flex: 1; }
.cc-cat-name { font-weight: 700; margin-bottom: 4px; font-size: 13px; }
.cc-cat-name .cc-req {
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
    background: #f1f5f9; color: #64748b; font-weight: 700; margin-left: 6px; vertical-align: middle;
}
.cc-cat-desc { font-size: 12px; opacity: 0.8; line-height: 1.4; }

/* ====== Toggle switch ====== */
.cc-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.cc-toggle input { opacity: 0; width: 0; height: 0; }
.cc-toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #cbd5e1; border-radius: 22px; transition: 0.2s;
}
.cc-toggle-slider::before {
    position: absolute; content: ""; height: 16px; width: 16px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cc-toggle input:checked + .cc-toggle-slider { background: #f97316; }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(18px); }
.cc-toggle input:disabled + .cc-toggle-slider { opacity: 0.55; cursor: not-allowed; }

.cc-dns-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,0.08); text-align: center; }
.cc-theme-dark .cc-dns-row { border-top-color: rgba(255,255,255,0.1); }
.cc-dns-link { color: #ef4444; font-weight: 700; text-decoration: underline; font-size: 13px; }

/* ====== Floating change button — pozisyon ayarına göre ====== */
.cc-change-btn {
    position: fixed; z-index: 99996;
    border: none; border-radius: 999px; padding: 10px 14px;
    font-size: 12px; font-weight: 700; cursor: pointer;
    background: #0f172a; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    display: inline-flex; align-items: center; gap: 6px;
    /* default fallback */
    left: 12px; bottom: 12px;
}
/* Banner'ın pozisyonuna göre buton da hizalanır */
.cc-change-btn.cc-pos-bottom,
.cc-change-btn.cc-pos-bottom-left  { left: 12px;  right: auto; bottom: 12px; top: auto; }
.cc-change-btn.cc-pos-bottom-right { right: 12px; left: auto;  bottom: 12px; top: auto; }
.cc-change-btn.cc-pos-top          { left: 12px;  right: auto; top: 12px;    bottom: auto; }
.cc-change-btn.cc-theme-light { background: #fff; color: #0f172a; border: 1px solid #e5e7eb; }
.cc-change-btn:hover { transform: translateY(-1px); }
.cc-change-btn::before { content: '🍪'; font-size: 14px; }

/* Layouts mobile responsive */
@media (max-width: 720px) {
    .cc-banner-inner { flex-direction: column; align-items: stretch; }
    .cc-banner-actions { justify-content: flex-end; }
    .cc-modal-panel { border-radius: 14px 14px 0 0; bottom: 0; top: auto; left: 0; right: 0; transform: none; width: 100%; max-height: 90vh; }
}

#cookie-dns-floating {
    /* Footer'a manuel eklenmediyse banner kapandıktan sonra floating buton ile erişiliyor zaten;
       bu eleman gizli kalır, JS gerekirse gösterir. */
    display: none;
    position: fixed; right: 12px; bottom: 12px; z-index: 99995;
    background: transparent; color: #ef4444; font-size: 11px; text-decoration: underline;
}
