/*
 * Pre-boot shell styles.
 *
 * Loaded from `index.html` before any JS, so these values necessarily duplicate a
 * few design tokens: they paint the page during the window where Chakra has not
 * mounted and `--chakra-colors-*` does not exist yet. Keep them in step with
 * `bg.canvas` in `src/design/tokens/semantic.ts` and the body font in
 * `primitives.ts` — a mismatch here shows up as a flash of the wrong colour on
 * every cold load, which no test catches.
 *
 * Vazirmatn is loaded with the app bundle. Shabnam FD remains declared below as
 * the self-hosted fallback during the pre-boot window.
 */

/* Shabnam FD - Light */
@font-face {
  font-family: "Shabnam FD";
  src: url("/fonts/Shabnam-Light-FD.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Shabnam FD - Regular */
@font-face {
  font-family: "Shabnam FD";
  src: url("/fonts/Shabnam-FD.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Shabnam FD - Medium */
@font-face {
  font-family: "Shabnam FD";
  src: url("/fonts/Shabnam-Medium-FD.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Shabnam FD - Bold */
@font-face {
  font-family: "Shabnam FD";
  src: url("/fonts/Shabnam-Bold-FD.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  direction: rtl;
  background-color: #f4f6fb;
  overflow-x: hidden;
}

body {
  font-family:
    "Vazirmatn Variable", "Vazirmatn", "Shabnam FD", "Tahoma", sans-serif;
  font-feature-settings: "ss01";
  background-color: #f4f6fb;
  min-height: 100dvh;
  overflow-x: hidden;
}

html[data-theme="dark"],
html.dark {
  background-color: #05080d;
}

html[data-theme="dark"] body,
html.dark body {
  background-color: #05080d;
}

#root {
  height: 100%;
  min-height: 100dvh;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}
