/* ============================================================
 * LEGAL PAGES & POPUP - KVKK / Çerez / Gizlilik
 * Hem standalone sayfada (/kvkk, /cerez-politikasi, /gizlilik)
 * hem de site geneli popup modalda aynı CSS kullanılır.
 * ============================================================ */

.legal-page {
  padding: clamp(60px, 8vw, 110px) 0;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(34,211,238,0.05), transparent 60%),
    var(--bg, #0a1020);
  min-height: 60vh;
}
.legal-page__wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Doc shared component (standalone + popup) ===== */
.legal-doc {
  color: var(--text, #e6ebf5);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.75;
}
.legal-doc__head {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border, rgba(148,163,184,0.14));
}
.legal-doc__eyebrow {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #22d3ee;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.28);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.legal-doc__title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 14px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.legal-doc__intro {
  font-size: 16px;
  color: var(--text-muted, #b3bcd0);
  margin: 0 0 18px;
  max-width: 70ch;
}
.legal-doc__intro strong { color: var(--text, #e6ebf5); font-weight: 600; }
.legal-doc__intro em { color: var(--text, #e6ebf5); font-style: normal; font-weight: 500; }
.legal-doc__meta {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 13px;
  color: var(--text-muted, #7d8aa3);
}
.legal-doc__meta strong { color: var(--text, #e6ebf5); font-weight: 600; }

/* ===== TOC ===== */
.legal-doc__toc {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border, rgba(148,163,184,0.14));
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 40px;
}
.legal-doc__toc strong {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #22d3ee;
  margin-bottom: 12px;
  font-weight: 700;
}
.legal-doc__toc ol {
  list-style: decimal inside;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 32px;
}
.legal-doc__toc li {
  break-inside: avoid;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-muted, #b3bcd0);
}
.legal-doc__toc a {
  color: var(--text-muted, #b3bcd0);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .18s, border-color .18s;
}
.legal-doc__toc a:hover {
  color: #22d3ee;
  border-bottom-color: rgba(34,211,238,0.4);
}
@media (max-width: 640px) {
  .legal-doc__toc ol { columns: 1; }
}

/* ===== Sections ===== */
/* main.css'teki global `section { padding: 84px 0 }` kuralini ezmek icin padding:0 */
.legal-doc__section {
  margin-bottom: 36px;
  padding: 0;
  scroll-margin-top: 100px;
  position: relative;
}
.legal-doc__section:last-child { margin-bottom: 0; }
.legal-doc__section h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--text, #e6ebf5);
  margin: 0 0 14px;
  padding-left: 14px;
  border-left: 3px solid #22d3ee;
}
.legal-doc__section h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #e6ebf5);
  margin: 22px 0 10px;
}
.legal-doc__section p {
  margin: 0 0 14px;
  color: var(--text-muted, #b3bcd0);
}
.legal-doc__section p:last-child { margin-bottom: 0; }
.legal-doc__section strong {
  color: var(--text, #e6ebf5);
  font-weight: 600;
}
.legal-doc__section em {
  color: var(--text, #e6ebf5);
  font-style: italic;
  font-weight: 500;
}
.legal-doc__section a {
  color: #22d3ee;
  text-decoration: none;
  border-bottom: 1px solid rgba(34,211,238,0.35);
  transition: color .15s, border-color .15s;
}
.legal-doc__section a:hover {
  color: #67e8f9;
  border-bottom-color: #67e8f9;
}

/* Lists */
.legal-doc__section ul,
.legal-doc__section ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-muted, #b3bcd0);
}
.legal-doc__section li {
  margin-bottom: 6px;
}
.legal-doc__section li::marker { color: #22d3ee; }

/* Callout (veri sorumlusu adres kutusu vb.) */
.legal-doc__callout {
  background:
    radial-gradient(80% 50% at 0% 0%, rgba(34,211,238,0.06), transparent 60%),
    rgba(255,255,255,0.025);
  border: 1px solid rgba(34,211,238,0.18);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 12px 0 18px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text, #e6ebf5);
}
.legal-doc__callout strong {
  color: #22d3ee;
  font-weight: 600;
  display: inline-block;
  min-width: 72px;
}

/* Tables */
.legal-doc__table-wrap {
  overflow-x: auto;
  margin: 12px 0 18px;
  border: 1px solid var(--border, rgba(148,163,184,0.14));
  border-radius: 12px;
}
.legal-doc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  color: var(--text-muted, #b3bcd0);
  min-width: 540px;
}
.legal-doc__table thead {
  background: rgba(34,211,238,0.06);
}
.legal-doc__table th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #22d3ee;
  border-bottom: 1px solid rgba(34,211,238,0.2);
}
.legal-doc__table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, rgba(148,163,184,0.10));
  vertical-align: top;
}
.legal-doc__table tr:last-child td { border-bottom: 0; }
.legal-doc__table tbody tr:hover { background: rgba(255,255,255,0.015); }
.legal-doc__table strong { color: var(--text, #e6ebf5); }

/* Footer block */
/* main.css'teki global `footer` kurallarini (grid-bg, gradient, padding-bottom:28, border-top) sifirla */
.legal-doc__foot {
  margin-top: 48px;
  padding: 28px 0 0;
  border-top: 1px solid var(--border, rgba(148,163,184,0.14));
  font-size: 13.5px;
  color: var(--text-muted, #b3bcd0);
  background: none;
  overflow: visible;
}
.legal-doc__foot::before,
.legal-doc__foot::after { content: none; display: none; background: none; }
.legal-doc__foot-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 36px;
  margin-bottom: 22px;
}
.legal-doc__foot-block {
  font-style: normal; /* <address> normalize */
}
.legal-doc__foot-block p {
  margin: 0;
  color: var(--text, #e6ebf5);
  line-height: 1.65;
}
.legal-doc__foot-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #22d3ee;
  margin-bottom: 8px;
}
.legal-doc__foot-sep {
  display: inline-block;
  margin: 0 8px;
  color: var(--text-muted, #7d8aa3);
  opacity: 0.6;
}
.legal-doc__foot a {
  color: var(--text, #e6ebf5);
  text-decoration: none;
  border-bottom: 1px solid rgba(34,211,238,0.25);
  transition: color .15s, border-color .15s;
}
.legal-doc__foot a:hover {
  color: #22d3ee;
  border-bottom-color: #22d3ee;
}
.legal-doc__foot-links {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(148,163,184,0.16);
  font-size: 12.5px;
}
.legal-doc__foot-links a {
  color: var(--text-muted, #b3bcd0);
  border-bottom: 1px dashed transparent;
}
.legal-doc__foot-links a:hover {
  color: #22d3ee;
  border-bottom-color: rgba(34,211,238,0.45);
}
@media (max-width: 640px) {
  .legal-doc__foot-meta { grid-template-columns: 1fr; gap: 18px; }
}

/* ============================================================
 * LEGAL POPUP MODAL
 * ============================================================ */
.lm {
  position: fixed; inset: 0; z-index: 1100;
  width: 100vw; max-width: 100vw;
  height: 100vh; height: 100dvh;
  max-height: 100vh; max-height: 100dvh;
  padding: 0; margin: 0; border: 0;
  background: transparent; color: #e6ebf5;
  display: none;
  align-items: center; justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.lm[open] { display: flex; animation: lmFade .25s ease-out; }
.lm::backdrop {
  background: rgba(4, 6, 13, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lm[open]::backdrop { animation: lmFade .25s ease-out; }
.lm.is-closing { animation: lmFadeOut .2s ease-in forwards; }
.lm.is-closing::backdrop { animation: lmFadeOut .2s ease-in forwards; }
@keyframes lmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lmFadeOut { from { opacity: 1; } to { opacity: 0; } }
body.lm-open { overflow: hidden; }

.lm__shell {
  position: relative;
  width: min(880px, calc(100vw - 24px));
  height: auto;
  max-height: min(calc(100vh - 32px), calc(100dvh - 32px));
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(34,211,238,0.07), transparent 55%),
    radial-gradient(80% 50% at 0% 100%, rgba(124,58,237,0.06), transparent 55%),
    linear-gradient(180deg, #0f1a35 0%, #0c1428 100%);
  border: 1px solid rgba(148,163,184,0.28);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 90px -22px rgba(0,0,0,0.7),
    0 0 0 1px rgba(34,211,238,0.06);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: lmShellIn .35s cubic-bezier(.2,.85,.25,1);
}
@keyframes lmShellIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lm__shell::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(34,211,238,.35), transparent 38%, rgba(124,58,237,.22));
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px; opacity: .55;
  z-index: 0;
}

/* Tabs header */
.lm__tabs {
  display: flex;
  gap: 4px;
  padding: 14px 64px 0 18px;
  border-bottom: 1px solid rgba(148,163,184,0.14);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  overflow-x: auto;
  scrollbar-width: none;
}
.lm__tabs::-webkit-scrollbar { display: none; }
.lm__tab {
  background: transparent;
  border: 0;
  color: #7d8aa3;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 12px 14px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.lm__tab:hover { color: #b3bcd0; }
.lm__tab.is-active {
  color: #22d3ee;
  border-bottom-color: #22d3ee;
}

/* Close */
.lm__close {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  color: #b3bcd0;
  border: 1px solid rgba(148,163,184,0.14); border-radius: 50%;
  cursor: pointer; z-index: 5;
  transition: color .15s, background .15s, border-color .15s, transform .15s;
}
.lm__close:hover {
  color: #e6ebf5; background: rgba(34,211,238,0.08);
  border-color: rgba(34,211,238,0.35);
  transform: rotate(90deg);
}

/* Body (scrollable) */
.lm__body {
  padding: 28px 36px 32px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.lm__body::-webkit-scrollbar { width: 6px; }
.lm__body::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.20); border-radius: 999px; }

/* Popup içinde doc başlık kompaktlaştır */
.lm__body .legal-doc { font-size: 14.5px; line-height: 1.65; }
.lm__body .legal-doc__head { margin-bottom: 18px; padding-bottom: 16px; }
.lm__body .legal-doc__eyebrow { display: none; }
.lm__body .legal-doc__title { font-size: clamp(22px, 3vw, 26px); margin-bottom: 10px; }
.lm__body .legal-doc__intro { font-size: 14px; margin-bottom: 14px; line-height: 1.6; }
.lm__body .legal-doc__meta { font-size: 12px; gap: 14px; }
.lm__body .legal-doc__section { margin-bottom: 18px; }
.lm__body .legal-doc__section h2 {
  font-size: 16px;
  padding-left: 12px;
  margin: 0 0 10px;
  line-height: 1.25;
}
.lm__body .legal-doc__section h3 { font-size: 14.5px; margin: 14px 0 6px; }
.lm__body .legal-doc__section p { margin: 0 0 10px; }
.lm__body .legal-doc__section ul,
.lm__body .legal-doc__section ol { margin: 0 0 12px; padding-left: 20px; }
.lm__body .legal-doc__section li { margin-bottom: 4px; }
.lm__body .legal-doc__callout {
  padding: 14px 18px;
  margin: 10px 0 12px;
  font-size: 13.5px;
  line-height: 1.7;
}
.lm__body .legal-doc__table { font-size: 12.5px; }
.lm__body .legal-doc__table th,
.lm__body .legal-doc__table td { padding: 10px 12px; }
.lm__body .legal-doc__toc { padding: 14px 18px; margin-bottom: 20px; }
.lm__body .legal-doc__toc strong { margin-bottom: 8px; font-size: 12px; }
.lm__body .legal-doc__toc li { margin-bottom: 4px; font-size: 13.5px; }
.lm__body .legal-doc__foot { margin-top: 24px; padding-top: 18px; font-size: 13px; }
.lm__body .legal-doc__foot-meta { gap: 18px 28px; margin-bottom: 16px; }
.lm__body .legal-doc__foot-label { font-size: 10px; margin-bottom: 6px; }
.lm__body .legal-doc__foot-links { padding-top: 14px; font-size: 12px; }

/* Loading state */
.lm__loading {
  padding: 80px 32px;
  text-align: center;
  color: #7d8aa3;
}
.lm__loading::before {
  content: '';
  display: block;
  width: 32px; height: 32px;
  margin: 0 auto 14px;
  border: 2px solid rgba(34,211,238,0.18);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: lmSpin .8s linear infinite;
}
@keyframes lmSpin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 640px) {
  .lm__shell {
    width: 100%;
    max-height: 100dvh;
    border-radius: 16px 16px 0 0;
    align-self: flex-end;
  }
  .lm[open] { align-items: flex-end; }
  .lm__body { padding: 22px 18px 28px; }
  .lm__tabs { padding: 12px 56px 0 14px; }
  .lm__tab { font-size: 12.5px; padding: 10px 10px 12px; }
}
