/* Wafferly — shared styles for the legal and support pages.
   Tokens and type match index.html so these pages read as part of the same site. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #42A5F5; --blue-dark: #1565C0; --gold: #FDD85D; --orange: #FD9F1D;
  --ink: #1A1A2E; --ink2: #4A5568; --ink3: #9CA3AF;
  --bg: #FAFBFC; --white: #FFFFFF; --radius: 20px;
  --rule: rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[dir="rtl"] body { font-family: 'Tajawal', -apple-system, sans-serif; }
html[dir="rtl"] .nav-brand { flex-direction: row-reverse; }
html[dir="rtl"] .footer-inner { direction: rtl; }
html[dir="rtl"] .doc { text-align: right; }
html[dir="rtl"] .crumb { flex-direction: row-reverse; }

/* NAV — same treatment as index.html */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 32px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-img { height: 34px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a {
  font-size: 14px; font-weight: 600; color: var(--ink2);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue-dark); }
.lang-toggle {
  display: flex; align-items: center; background: var(--bg);
  border-radius: 10px; padding: 3px; border: 1px solid rgba(0,0,0,0.06);
}
.lang-btn {
  padding: 6px 14px; border-radius: 8px; border: none; font-size: 13px;
  font-weight: 600; cursor: pointer; background: transparent; color: var(--ink3);
  transition: all 0.2s; font-family: inherit;
}
.lang-btn.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.lang-btn:focus-visible, .nav-links a:focus-visible, .doc a:focus-visible {
  outline: 2px solid var(--blue-dark); outline-offset: 3px;
}

/* PAGE HEAD */
.page-head {
  padding: 130px 32px 44px;
  background: linear-gradient(160deg, var(--bg) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--rule);
}
/* 780 content + 2 × 32 padding, so the header text lines up with .doc below it */
.page-head-inner { max-width: 844px; margin: 0 auto; padding: 0 32px; }
.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink3); margin-bottom: 14px;
}
.crumb a { color: var(--blue-dark); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.page-head h1 {
  font-size: clamp(30px, 5vw, 44px); font-weight: 800;
  letter-spacing: -1.2px; line-height: 1.1; margin-bottom: 12px;
  text-wrap: balance;
}
.page-head .lede { font-size: 16px; line-height: 1.7; color: var(--ink2); max-width: 620px; }
.updated {
  display: inline-block; margin-top: 18px; font-size: 12px; font-weight: 600;
  color: var(--ink2); background: var(--white); border: 1px solid var(--rule);
  border-radius: 50px; padding: 7px 16px;
}

/* DOCUMENT BODY */
.doc { max-width: 844px; margin: 0 auto; padding: 52px 32px 80px; }
.doc h2 {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  margin: 48px 0 16px; padding-top: 24px; border-top: 2px solid var(--ink);
  text-wrap: balance;
}
.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { font-size: 17px; font-weight: 700; margin: 30px 0 12px; color: var(--ink); }
.doc p { font-size: 15.5px; line-height: 1.8; color: var(--ink2); margin-bottom: 16px; }
.doc p strong, .doc li strong { color: var(--ink); font-weight: 700; }
.doc ul { margin: 0 0 18px; padding-inline-start: 22px; }
.doc li { font-size: 15.5px; line-height: 1.8; color: var(--ink2); margin-bottom: 8px; }
.doc a { color: var(--blue-dark); font-weight: 600; text-underline-offset: 3px; }

/* TABLES — the reason these pages exist as HTML */
.table-wrap { overflow-x: auto; margin: 0 0 24px; border-radius: 14px; border: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 460px; }
thead th {
  background: var(--bg); text-align: start; font-weight: 700; color: var(--ink);
  padding: 13px 16px; border-bottom: 1px solid var(--rule); font-size: 12.5px;
  letter-spacing: 0.6px; text-transform: uppercase;
}
tbody td {
  padding: 13px 16px; border-bottom: 1px solid var(--rule);
  color: var(--ink2); line-height: 1.65; vertical-align: top;
}
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--ink); font-weight: 600; }

/* CALLOUT */
.note {
  background: rgba(66,165,245,0.07); border-inline-start: 3px solid var(--blue);
  border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 0 0 24px;
}
html[dir="rtl"] .note { border-radius: 12px 0 0 12px; }
.note p:last-child { margin-bottom: 0; }
.note.warn { background: rgba(253,159,29,0.08); border-inline-start-color: var(--orange); }

/* CONTACT BLOCK */
.contact-card {
  background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px 28px; margin-top: 12px;
}
.contact-card p { margin-bottom: 8px; font-size: 15px; }
.contact-card p:last-child { margin-bottom: 0; }

/* SUPPORT PAGE — question list */
.qa { border-top: 1px solid var(--rule); }
.qa-item { border-bottom: 1px solid var(--rule); padding: 22px 0; }
.qa-item h3 { margin: 0 0 8px; font-size: 16.5px; }
.qa-item p { margin-bottom: 0; }

/* DELETE PAGE — steps */
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0 0 24px; }
.steps-list li {
  counter-increment: s; position: relative;
  padding-inline-start: 46px; margin-bottom: 20px; min-height: 32px;
}
.steps-list li::before {
  content: counter(s); position: absolute; inset-inline-start: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

/* FOOTER — same as index.html */
footer { padding: 56px 32px 36px; background: var(--ink); color: rgba(255,255,255,0.5); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-brand .brand-name {
  font-size: 24px; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 13px; line-height: 1.8; max-width: 320px; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.5); text-decoration: none;
  font-size: 14px; margin-bottom: 10px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1100px; margin: 44px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 12px; }
.footer-bottom .license {
  font-size: 11px; background: rgba(255,255,255,0.06); padding: 8px 16px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.06);
}
.copyright { text-align: center; margin-top: 30px; font-size: 12px; opacity: 0.4; }

/* language visibility */
[data-lang-block] { display: none; }
[data-lang-block].on { display: block; }

@media (max-width: 768px) {
  nav { padding: 12px 18px; }
  .nav-links { gap: 12px; }
  .nav-links .nav-home { display: none; }
  .page-head { padding: 108px 20px 34px; }
  .doc { padding: 40px 20px 64px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  nav, footer, .lang-toggle, .crumb { display: none; }
  body { background: #fff; }
  .page-head { padding: 0 0 20px; background: none; }
  .doc { padding: 0; max-width: none; }
  a { color: #000; text-decoration: underline; }
}
