/* Cookie consent banner + preferences dialog (App\Services\Consent, assets/js/consent.js; docs/LEGAL.md).
   Loaded without blocking the first paint; the banner stays hidden until this sheet and the script are ready.
   "Reddet" and "Kabul et" are deliberately the same size and weight (KVKK Çerez Rehberi: no nudging). */
.ck-bar {
  position: fixed; z-index: 70; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--p-line); border-radius: var(--p-r-xl);
  background: var(--p-surface); color: var(--p-text); box-shadow: var(--p-sh-lg);
  font-size: .9rem; line-height: 1.55;
  animation: ckIn .32s var(--p-ease-out) both;
}
.ck-bar[hidden] { display: none; }
@keyframes ckIn { from { opacity: 0; transform: translateY(12px); } }
.ck-bar-in { padding: 18px 18px 16px; }
.ck-bar-t { margin: 0; }
.ck-bar-t b { display: block; margin-bottom: 4px; font: 700 .98rem/1.3 var(--p-font-head); color: var(--p-ink); }
.ck-bar-t a, .ck-dlg-lead a { color: var(--p-primary); text-decoration: underline; text-underline-offset: 3px; }
.ck-bar-a { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ck-bar-a .ck-link { grid-column: 1 / -1; justify-self: center; }
.ck-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px;
  border: 1px solid var(--p-ink); border-radius: var(--p-r);
  background: var(--p-ink); color: var(--p-bg);
  font: 600 .88rem/1 var(--p-font); cursor: pointer;
  transition: opacity .15s, box-shadow .15s;
}
.ck-btn:hover { opacity: .88; }
.ck-btn:focus-visible, .ck-link:focus-visible, .ck-x:focus-visible, .ck-sw input:focus-visible + .ck-sw-ui { outline: none; box-shadow: var(--p-ring); }
.ck-btn--save { border-color: var(--p-primary); background: var(--p-primary); color: #fff; }
.ck-link { min-height: 36px; padding: 0 8px; border: 0; background: none; color: var(--p-muted); font: 600 .84rem/1 var(--p-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ck-link:hover { color: var(--p-ink); }

.ck-dlg {
  width: min(600px, calc(100vw - 32px)); max-height: min(86vh, 760px); margin: auto; padding: 0;
  border: 1px solid var(--p-line); border-radius: var(--p-r-xl);
  background: var(--p-surface); color: var(--p-text); box-shadow: var(--p-sh-lg);
}
.ck-dlg::backdrop { background: rgb(5 7 15 / .55); backdrop-filter: blur(2px); }
.ck-dlg[open] { animation: ckIn .28s var(--p-ease-out) both; }
.ck-dlg-in { display: flex; flex-direction: column; max-height: inherit; }
.ck-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.ck-dlg-head h2 { margin: 0; font: 700 1.2rem/1.3 var(--p-font-head); color: var(--p-ink); }
.ck-x { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: var(--p-r); background: var(--p-soft); color: var(--p-ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.ck-dlg-lead { margin: 10px 20px 0; font-size: .88rem; line-height: 1.6; color: var(--p-muted); }
.ck-cats { display: grid; gap: 10px; margin: 16px 0 0; padding: 0 20px; overflow: auto; list-style: none; }
.ck-cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--p-line); border-radius: var(--p-r-lg); background: var(--p-surface-2); }
.ck-cat-t b { display: block; font-size: .94rem; color: var(--p-ink); }
.ck-cat-t p { margin: 4px 0 0; font-size: .84rem; line-height: 1.55; color: var(--p-muted); }
.ck-always { flex: none; padding: 5px 9px; border-radius: 99px; background: var(--p-success-50); color: var(--p-success-ink); font: 600 .72rem/1.2 var(--p-font); white-space: nowrap; }
.ck-sw { position: relative; flex: none; display: inline-flex; cursor: pointer; }
.ck-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-sw-ui { position: relative; display: block; width: 46px; height: 26px; border-radius: 99px; background: var(--p-line-2); transition: background-color .18s; }
.ck-sw-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .18s var(--p-ease-out); }
.ck-sw input:checked + .ck-sw-ui { background: var(--p-primary); }
.ck-sw input:checked + .ck-sw-ui::after { transform: translateX(20px); }
.ck-dlg-a { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 16px 20px 18px; margin-top: 12px; border-top: 1px solid var(--p-line); }
.ck-dlg-id { margin: -8px 20px 14px; font: 500 .72rem/1.4 var(--p-font-mono); color: var(--p-muted); }
.ck-dlg-id[hidden] { display: none; }

@media (max-width: 560px) {
  .ck-bar { left: 0; right: 0; bottom: 0; width: auto; border-radius: var(--p-r-xl) var(--p-r-xl) 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .ck-bar-in { padding: 16px; }
  .ck-btn { min-height: 46px; font-size: 15px; }
  .ck-link { min-height: 44px; font-size: 14px; }
  .ck-dlg { width: 100vw; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: var(--p-r-xl) var(--p-r-xl) 0 0; }
  .ck-dlg-a { grid-template-columns: 1fr 1fr; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .ck-dlg-a .ck-btn--save { grid-column: 1 / -1; order: -1; }
}
@media (prefers-reduced-motion: reduce) { .ck-bar, .ck-dlg[open] { animation: none; } .ck-sw-ui, .ck-sw-ui::after { transition: none; } }
@media print { .ck-bar, .ck-dlg { display: none !important; } }
