/*
 * Enketo web forms in the IITA M&E platform's look (frontend/src/lib/theme/theme.ts). The gateway
 * (nginx ee. block) links this after Enketo's theme and swaps the theme's brand colours (blue →
 * orange) and font in the stylesheet itself; this file adds what a colour swap can't: the font
 * files, the page and paper, the header bar, corners and focus rings.
 */
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/__iita/fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/__iita/fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --iita-navy: #07162a;
  --iita-orange: #f26522;
  --iita-orange-dark: #c94f14;
  --iita-ink: #180a03;
  --iita-text-secondary: #5a5f6a;
  --iita-divider: #e3e6ed;
  --iita-background: #f5f6f9;
  --iita-radius: 8px;
}

body {
  font-family: "Public Sans", "Segoe UI", Arial, sans-serif;
  color: var(--iita-ink);
  background-color: var(--iita-background);
}

/* the form sheet: the app's cards (white, hairline border, 8px corners) */
.paper {
  border: 1px solid var(--iita-divider);
  border-radius: calc(var(--iita-radius) * 1.5);
  box-shadow: 0 1px 2px rgba(7, 22, 42, 0.06);
}

/* the header: logo (config.json "logo", linking to the app) on the left of the actions */
.form-header__branding img {
  max-height: 36px;
  max-width: 150px;
}

#form-title {
  color: var(--iita-navy);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.or-group > h4,
.or > h4 {
  color: var(--iita-navy);
  font-weight: 600;
}

.or-hint,
.question .or-hint {
  color: var(--iita-text-secondary);
}

/* buttons and inputs: the app's corners and focus ring */
.btn,
.vex.vex-theme-plain .vex-dialog-button {
  border-radius: var(--iita-radius);
  font-weight: 600;
  text-transform: none;
}

.btn-primary,
.vex.vex-theme-plain .vex-dialog-button.vex-dialog-button-primary {
  background-color: var(--iita-orange);
  border-color: var(--iita-orange);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.vex.vex-theme-plain .vex-dialog-button.vex-dialog-button-primary:hover {
  background-color: var(--iita-orange-dark);
  border-color: var(--iita-orange-dark);
  color: #fff;
}

.or input:not([type="radio"]):not([type="checkbox"]),
.or select,
.or textarea,
.form-control {
  border-radius: var(--iita-radius);
}

.or input:focus,
.or select:focus,
.or textarea:focus,
.form-control:focus {
  border-color: var(--iita-orange);
  outline: none;
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.2);
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--iita-orange);
}

/* the queue side panel and its toggle */
.side-slider {
  font-family: inherit;
}

.side-slider__toggle {
  background-color: var(--iita-navy);
}
