/* ==========================================================================
   The new console's look for the pages outside it (sign-in, connecting a number):
   tokens, surfaces and fonts, matching web/src/styles.css. Keep them in step.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/design-system/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/design-system/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/design-system/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/design-system/fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/design-system/fonts/noto-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/design-system/fonts/noto-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ========================================================================== */
/* Tokens: the console's neutral light and dark theme (web/src/styles.css), as plain   */
/* colours for the pages outside it. --green is the main button's colour (near black   */
/* in light, near white in dark), as in the console.                                   */
/* ========================================================================== */

:root {
  --page: #fafafa;
  --ink: #262626;
  --muted: #6b6b6b;
  --faint: #a3a3a3;
  --line: rgba(0, 0, 0, 0.08);
  --chip: rgba(0, 0, 0, 0.04);
  --chip-hover: rgba(0, 0, 0, 0.07);
  --glass-1: #ffffff;
  --glass-2: #ffffff;
  --glass-3: #ffffff;
  --edge: rgba(0, 0, 0, 0.08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.08);
  --solid-1: #ffffff;
  --solid-3: #ffffff;
  --green: #262626;
  --on-green: #fafafa;
  --green-text: #047857;
  --green-soft: rgba(16, 185, 129, 0.1);
  --warn-text: #b45309;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --danger-text: #b91c1c;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --info-text: #1d4ed8;
  --info-soft: rgba(59, 130, 246, 0.1);
  --read: #2563eb;
  --bubble-in: #ffffff;
  --bubble-in-edge: rgba(0, 0, 0, 0.08);
  --bubble-out: #dcf7e3;
  --bubble-out-ink: #0b2a14;
  --note: #fffbeb;
  --note-ink: #78350f;
  --blob-a: transparent;
  --blob-b: transparent;
  --blob-c: transparent;
  --scrim: rgba(0, 0, 0, 0.32);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #121212;
    --ink: #f5f5f5;
    --muted: #a1a1a1;
    --faint: #737373;
    --line: rgba(255, 255, 255, 0.07);
    --chip: rgba(255, 255, 255, 0.05);
    --chip-hover: rgba(255, 255, 255, 0.09);
    --glass-1: #1a1a1a;
    --glass-2: #1a1a1a;
    --glass-3: #1a1a1a;
    --edge: rgba(255, 255, 255, 0.08);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.45);
    --solid-1: #1a1a1a;
    --solid-3: #1a1a1a;
    --green: #f5f5f5;
    --on-green: #262626;
    --green-text: #34d399;
    --green-soft: rgba(16, 185, 129, 0.16);
    --warn-text: #fbbf24;
    --warn-soft: rgba(245, 158, 11, 0.16);
    --danger-text: #f87171;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --info-text: #60a5fa;
    --info-soft: rgba(59, 130, 246, 0.16);
    --read: #38bdf8;
    --bubble-in: #232323;
    --bubble-in-edge: rgba(255, 255, 255, 0.08);
    --bubble-out: #12492a;
    --bubble-out-ink: #e7f8ec;
    --note: rgba(245, 158, 11, 0.14);
    --note-ink: #fde68a;
    --scrim: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --page: #121212;
  --ink: #f5f5f5;
  --muted: #a1a1a1;
  --faint: #737373;
  --line: rgba(255, 255, 255, 0.07);
  --chip: rgba(255, 255, 255, 0.05);
  --chip-hover: rgba(255, 255, 255, 0.09);
  --glass-1: #1a1a1a;
  --glass-2: #1a1a1a;
  --glass-3: #1a1a1a;
  --edge: rgba(255, 255, 255, 0.08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.45);
  --solid-1: #1a1a1a;
  --solid-3: #1a1a1a;
  --green: #f5f5f5;
  --on-green: #262626;
  --green-text: #34d399;
  --green-soft: rgba(16, 185, 129, 0.16);
  --warn-text: #fbbf24;
  --warn-soft: rgba(245, 158, 11, 0.16);
  --danger-text: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.16);
  --info-text: #60a5fa;
  --info-soft: rgba(59, 130, 246, 0.16);
  --read: #38bdf8;
  --bubble-in: #232323;
  --bubble-in-edge: rgba(255, 255, 255, 0.08);
  --bubble-out: #12492a;
  --bubble-out-ink: #e7f8ec;
  --note: rgba(245, 158, 11, 0.14);
  --note-ink: #fde68a;
  --scrim: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

:root {
  --font-sans: "Inter", "Noto Sans Arabic", system-ui, sans-serif;
  --font-arabic: "Noto Sans Arabic", "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body,
:lang(ar) {
  font-family: var(--font-arabic);
}
* {
  box-sizing: border-box;
}
:focus-visible {
  outline: 2px solid var(--faint);
  outline-offset: 2px;
}

/* ========================================================================== */
/* Surfaces: bordered cards (the old glass names are kept for the pages that use them) */
/* ========================================================================== */

.glass-1,
.glass-2,
.glass-3 {
  border: 1px solid var(--edge);
  background: var(--solid-3);
}
.glass-1 {
  box-shadow: var(--shadow-1);
}
.glass-2 {
  box-shadow: var(--shadow-2);
}
.glass-3 {
  box-shadow: var(--shadow-3);
}

/* the plain page colour behind the card (sign-in, connect a number) */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--page);
}

.card {
  background: var(--solid-3);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow-1);
  border-radius: 18px;
}
