/* SadayChess website — the app's water-tinted glass, flattened for reading. Light edition by default, the dark one when
   the device asks for it. Colours from composeApp design/Tokens.kt; the face is the app's own IBM Plex Sans Arabic (OFL). */

@font-face {
  font-family: "Plex Arabic";
  src: url("fonts/ibm_plex_sans_arabic_regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("fonts/ibm_plex_sans_arabic_semibold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --bg: #e2f5f6;
  --pane: rgba(255, 255, 255, 0.78);
  --rim: rgba(13, 81, 99, 0.16);
  --ink: #071b2c;
  --muted: #3e5a68;
  --heading: #0d5163;
  --accent: #0b6c7d;
  --button-top: #16879a;
  --button-bottom: #0c6677;
  --success: #1d7a41;
  --error: #b3323a;
  --glow-a: rgba(101, 221, 235, 0.35);
  --glow-b: rgba(18, 60, 80, 0.12);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071b2c;
    --pane: rgba(101, 221, 235, 0.08);
    --rim: rgba(184, 243, 244, 0.18);
    --ink: #f4fafc;
    --muted: #a9c4d0;
    --heading: #b8f3f4;
    --accent: #65ddeb;
    --success: #45c06a;
    --error: #ff8a8f;
    --glow-a: rgba(18, 60, 80, 0.9);
    --glow-b: rgba(101, 221, 235, 0.12);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 30rem at 15% -10%, var(--glow-a), transparent 70%),
    radial-gradient(50rem 30rem at 100% 0%, var(--glow-b), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Plex Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

header.site { padding: 20px 0 8px; }
header.site .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.langs { display: flex; gap: 6px; flex-wrap: wrap; }
.langs a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--rim); text-decoration: none; font-size: 15px; color: var(--ink); background: var(--pane); }
.langs a[aria-current="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }

nav.pages { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 0; font-size: 15px; }
nav.pages a { text-decoration: none; }
nav.pages a[aria-current="page"] { font-weight: 600; text-decoration: underline; }

main { padding: 12px 0 40px; }

.pane {
  background: var(--pane);
  border: 1px solid var(--rim);
  border-radius: 20px;
  padding: 22px 22px;
  margin: 18px 0;
  backdrop-filter: blur(6px);
}

h1 { color: var(--heading); font-size: 30px; line-height: 1.35; margin: 18px 0 4px; }
h2 { color: var(--heading); font-size: 21px; line-height: 1.4; margin: 30px 0 6px; }
h3 { font-size: 17px; margin: 18px 0 4px; }
p, li { margin: 6px 0; }
ul, ol { padding-inline-start: 24px; }
.meta { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.lead { font-size: 19px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
th, td { text-align: start; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rim); }
th { color: var(--heading); font-weight: 600; }

.ltr { direction: ltr; unicode-bidi: isolate; }
/* An e-mail address is one word: never broken at its hyphen (support@sada-group.app), in any language. */
a[href^="mailto:"] { white-space: nowrap; direction: ltr; unicode-bidi: isolate; }

/* The deletion form */
form { margin: 0; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type="email"], input[type="text"] {
  width: 100%;
  max-width: 420px;
  font: inherit;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--rim);
  background: var(--bg);
  color: var(--ink);
}
input[inputmode="numeric"] { letter-spacing: 0.3em; max-width: 220px; direction: ltr; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 7px; width: 18px; height: 18px; }
button {
  font: inherit;
  font-weight: 600;
  margin-top: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: linear-gradient(var(--button-top), var(--button-bottom));
  cursor: pointer;
  min-height: 44px;
}
button.danger { background: linear-gradient(#d94b52, #b3323a); }
button[disabled] { opacity: 0.55; cursor: progress; }
button.link { background: none; color: var(--accent); padding: 0; min-height: 0; margin: 10px 0 0; text-decoration: underline; font-weight: 400; }
.status { min-height: 1.7em; margin: 10px 0 0; }
.status.error { color: var(--error); }
.status.ok { color: var(--success); }
[hidden] { display: none !important; }

footer.site { border-top: 1px solid var(--rim); padding: 18px 0 30px; color: var(--muted); font-size: 15px; }
footer.site p { margin: 4px 0; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 25px; }
  .pane { padding: 18px 16px; border-radius: 16px; }
}
