/* ============================================================
   Praticore — Çerez onay sistemi stilleri
   Site temasına (koyu/açık) otomatik uyumlu
   ============================================================ */

/* ---------- Banner ---------- */
.cc-banner {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 400;
  width: min(760px, calc(100vw - 2rem));
  background: color-mix(in srgb, var(--surface, #1a2234) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--border, #64748b) 72%, #fff 28%);
  border-radius: 22px;
  box-shadow: 0 24px 72px rgba(3, 8, 20, 0.34), 0 8px 24px rgba(3, 8, 20, 0.16);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  backdrop-filter: blur(22px) saturate(1.18);
  overflow: hidden;
  isolation: isolate;
  animation: cc-slide-up 0.4s ease;
}

.cc-banner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--gradient, linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4));
  opacity: 0.9;
  pointer-events: none;
}

[data-theme="light"] .cc-banner {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.18), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.cc-banner--hide {
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

@keyframes cc-slide-up {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.cc-banner__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1.2rem 1.3rem 1.25rem;
}

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

.cc-banner__text strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text, #f1f5f9);
  margin-bottom: 0.35rem;
}

.cc-banner__text p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-muted, #94a3b8);
}

.cc-banner__text a {
  color: var(--accent-light, #60a5fa);
  text-decoration: underline;
}

.cc-banner__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.cc-banner__actions .cc-btn {
  width: 100%;
  text-align: center;
}

.cc-banner__actions .cc-btn--primary {
  grid-column: 1 / -1;
  grid-row: 1;
}

/* ---------- Butonlar ---------- */
.cc-btn {
  border: none;
  cursor: pointer;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  border-radius: 100px;
  letter-spacing: 0.005em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.cc-btn:active { transform: scale(0.97); }

.cc-btn:focus-visible,
.cc-banner__text a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, #3b82f6) 50%, transparent);
  outline-offset: 3px;
}

.cc-btn--primary {
  background: var(--gradient, linear-gradient(135deg, #3b82f6, #8b5cf6));
  color: #fff;
  box-shadow: 0 6px 18px var(--accent-glow, rgba(59, 130, 246, 0.35));
}

.cc-btn--primary:hover {
  box-shadow: 0 8px 24px var(--accent-glow, rgba(59, 130, 246, 0.5));
  transform: translateY(-1px);
}

.cc-btn--ghost {
  background: transparent;
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border, rgba(148, 163, 184, 0.25));
}

.cc-btn--ghost:hover {
  color: var(--text, #f1f5f9);
  border-color: var(--accent, #3b82f6);
}

/* ---------- Modal ---------- */
.cc-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 410;
  background: rgba(5, 8, 14, 0.65);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

[data-theme="light"] .cc-modal {
  background: rgba(15, 23, 42, 0.35);
}

.cc-modal--open { display: flex; }

.cc-modal__box {
  width: min(480px, 100%);
  background: var(--surface, #1a2234);
  border: 1px solid var(--border, rgba(148, 163, 184, 0.12));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: cc-pop 0.25s ease;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

@keyframes cc-pop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: none; }
}

.cc-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.12));
}

.cc-modal__head strong {
  color: var(--text, #f1f5f9);
  font-size: 1rem;
}

.cc-modal__close {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.cc-modal__close:hover { color: var(--text, #f1f5f9); }

.cc-modal__body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cc-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-alt, #111827);
  border: 1px solid var(--border, rgba(148, 163, 184, 0.12));
  border-radius: var(--radius, 12px);
}

.cc-cat__info strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text, #f1f5f9);
  margin-bottom: 0.15rem;
}

.cc-cat__info p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
}

/* ---------- Anahtar (switch) ---------- */
.cc-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-switch span {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: var(--border, rgba(148, 163, 184, 0.25));
  transition: background 0.2s ease;
}

.cc-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.cc-switch input:checked + span {
  background: var(--accent, #3b82f6);
}

.cc-switch input:checked + span::after {
  transform: translateX(20px);
}

.cc-switch--locked { cursor: not-allowed; opacity: 0.7; }
.cc-switch--locked input:checked + span { background: #22c55e; }

.cc-modal__foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border, rgba(148, 163, 184, 0.12));
}

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .cc-banner {
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    width: calc(100vw - 1rem);
    border-radius: 18px;
  }

  .cc-banner__inner {
    gap: 0.8rem;
    padding: 1rem;
  }

  .cc-banner__actions {
    gap: 0.5rem;
  }

  .cc-banner__actions .cc-btn {
    padding-inline: 0.5rem;
  }

  .cc-modal__foot .cc-btn {
    flex: 1;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner { animation: none; }
  .cc-banner--hide { transition: opacity 0.15s ease; }
}
