/*
 * Childaid-Theme für LimeSurvey (survey.childaid.net)
 * Grundlage: Design-System Childaid, Abschnitt „Web und App“
 * (childaid-ops/decisions/design-system.md). Farben = Tokens des Systems.
 * Quelle im Repo: childaid-ops/scripts/root/limesurvey-theme/ — hier nicht
 * im Theme-Editor ändern, sonst überschreibt das nächste Einspielen die Änderung.
 */

/* ---------- Schriften (lokal, SIL OFL 1.1, keine Google-Fonts-Abfrage) ---------- */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/archivo-latin-400-normal.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: "Archivo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/archivo-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/archivo-latin-600-normal.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: "Archivo"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/archivo-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/archivo-latin-700-normal.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: "Archivo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/archivo-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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; }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/rajdhani-latin-500-normal.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: "Rajdhani"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/rajdhani-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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; }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/rajdhani-latin-600-normal.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: "Rajdhani"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/rajdhani-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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; }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/rajdhani-latin-700-normal.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: "Rajdhani"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/rajdhani-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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; }

/* ---------- Tokens ---------- */
:root {
  --ca-paper: #fbf8f5;
  --ca-card: #ffffff;
  --ca-peach: #fcebda;
  --ca-peach-light: #f9e5cf;
  --ca-line: #f1e4d8;
  --ca-red: #af0d1c;
  --ca-red-hover: #c4101f;
  --ca-red-pressed: #8f0a17;
  --ca-red-dark: #7a0a14;
  --ca-orange: #df7a0d;
  --ca-orange-text: #9f5709;
  --ca-ink: #333333;
  --ca-muted: #6c6c6c;
  --ca-radius-card: 16px;
  --ca-radius-box: 10px;
  --ca-radius-button: 8px;
  --ca-shadow-card: 0 1px 2px rgba(122, 10, 20, 0.04), 0 4px 16px rgba(122, 10, 20, 0.04);
  --ca-font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ca-font-display: "Rajdhani", "Archivo", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Grund und Text ---------- */
body.childaid,
body.font-childaid {
  background-color: var(--ca-paper);
  color: var(--ca-ink);
  font-family: var(--ca-font-sans);
}
body.font-childaid .form-control,
body.font-childaid .form-select,
body.font-childaid .btn,
body.font-childaid label,
body.font-childaid .dropdown-menu,
body.font-childaid .tooltip,
body.font-childaid .popover,
body.font-childaid .modal {
  font-family: var(--ca-font-sans);
}
body.font-childaid a:not(.btn) { color: var(--ca-red); }
body.font-childaid a:not(.btn):hover { color: var(--ca-red-pressed); }

/* ---------- Kopfzeile mit Logo ---------- */
body.font-childaid #survey-nav {
  background-color: var(--ca-card);
  border-bottom: 1px solid var(--ca-line);
  min-height: 64px;
}
body.font-childaid #survey-nav .logo-container { padding: 6px 0; margin-right: 0; }
body.font-childaid #survey-nav .logo { max-height: 48px; width: auto; }
body.font-childaid #survey-nav .navbar-toggler { color: var(--ca-ink); }

/* Fortschritt: rote Linie auf warmer Spur */
body.font-childaid .top-container .progress { height: 4px; background-color: var(--ca-line); border-radius: 999px; }
body.font-childaid .top-container .progress-bar { background-color: var(--ca-red); border-radius: 999px; }

/* ---------- Überschriften: Rajdhani in Farbe ---------- */
body.font-childaid .survey-name,
body.font-childaid h1.survey-name,
body.font-childaid .group-title,
body.font-childaid .completed-text h1,
body.font-childaid .completed-text h2,
body.font-childaid .survey-list-heading,
body.font-childaid .ls-register-form-title {
  font-family: var(--ca-font-display);
  font-weight: 700;
  color: var(--ca-red);
  letter-spacing: 0;
  line-height: 1.1;
}
body.font-childaid .survey-name { font-size: 2.6rem; margin-top: 1.5rem; }
body.font-childaid .group-title { font-size: 2rem; }
body.font-childaid .group-description,
body.font-childaid .survey-description,
body.font-childaid .survey-welcome { font-size: 1.0625rem; line-height: 1.6; }

/* ---------- Fragen als Karten ---------- */
body.font-childaid .question-container {
  background-color: var(--ca-card);
  border: 1px solid var(--ca-line);
  border-radius: var(--ca-radius-card);
  box-shadow: var(--ca-shadow-card);
  padding: 24px 28px;
  margin-bottom: 20px;
  /* .row bringt negative Seitenränder mit; Karte bündig zur Überschrift */
  margin-left: 0;
  margin-right: 0;
}
body.font-childaid .question-container .ls-label-question {
  font-family: var(--ca-font-sans);
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ca-ink);
}
body.font-childaid .question-container .asterisk,
body.font-childaid .question-container .text-danger { color: var(--ca-red); }
body.font-childaid .question-container .ls-question-message,
body.font-childaid .question-container .ls-questionhelp,
body.font-childaid .question-container .help-block { color: var(--ca-muted); }
body.font-childaid .question-container.input-error,
body.font-childaid .question-container .ls-error-mandatory { border-color: var(--ca-red); }
body.font-childaid .question-container .text-info { color: var(--ca-muted) !important; }

/* Matrix-Fragen: roter Kopf, warme Zeilen (Tabelle wie im Jahresbericht) */
body.font-childaid .ls-answers table thead th,
body.font-childaid .ls-answers table thead td { font-family: var(--ca-font-sans); font-weight: 600; }

/* ---------- Eingabefelder ---------- */
body.font-childaid .form-control,
body.font-childaid .form-select,
body.font-childaid .bootstrap-select > .btn {
  border-radius: var(--ca-radius-button);
}

/* ---------- Knöpfe ---------- */
body.font-childaid .btn { border-radius: var(--ca-radius-button); font-weight: 600; text-transform: none; letter-spacing: 0; }
/* Nur Navigation (Weiter, Absenden) und Dialoge; Antwortknöpfe regelt die Farbvariante */
body.font-childaid .ls-move-btn.btn-primary,
body.font-childaid .modal .btn-primary {
  background-color: var(--ca-red);
  border-color: var(--ca-red);
  color: #ffffff;
}
body.font-childaid .ls-move-btn.btn-primary:hover,
body.font-childaid .modal .btn-primary:hover { background-color: var(--ca-red-hover); border-color: var(--ca-red-hover); color: #ffffff; }
body.font-childaid .ls-move-btn.btn-primary:active,
body.font-childaid .modal .btn-primary:active { background-color: var(--ca-red-pressed); border-color: var(--ca-red-pressed); }
body.font-childaid #navigator-container .ls-move-btn { min-width: 9rem; }

/* ---------- Fokus: 2px Rot mit 2px Abstand, auf allem Klickbaren ---------- */
body.font-childaid a:focus-visible,
body.font-childaid button:focus-visible,
body.font-childaid .btn:focus-visible,
body.font-childaid input:focus-visible,
body.font-childaid select:focus-visible,
body.font-childaid textarea:focus-visible,
body.font-childaid [tabindex]:focus-visible,
body.font-childaid .btn-check:focus-visible + .btn {
  outline: 2px solid var(--ca-red);
  outline-offset: 2px;
  box-shadow: none;
}

/* ---------- Hinweise ---------- */
body.font-childaid .alert-info,
body.font-childaid .well { background-color: var(--ca-peach-light); border-color: var(--ca-line); color: var(--ca-ink); }

/* ---------- Umfrageliste (Startseite) ---------- */
body.font-childaid .ca-list-title {
  font-family: var(--ca-font-display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--ca-red);
  text-align: center;
  margin: 2rem 0 0.5rem;
}
body.font-childaid #surveys-list-container .btn-primary,
body.font-childaid .surveys-list .btn-primary { color: #ffffff; }

/* ---------- Fußzeile ---------- */
body.font-childaid .ca-footer {
  border-top: 1px solid var(--ca-line);
  margin-top: 3rem;
  padding: 1.25rem 16px 1.5rem;
  color: var(--ca-muted);
  font-size: 0.875rem;
  text-align: center;
}
body.font-childaid .ca-footer .ca-claim {
  font-family: var(--ca-font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ca-orange-text);
  display: block;
  margin-bottom: 0.25rem;
}
body.font-childaid .ca-footer a { color: var(--ca-muted); text-decoration: underline; }
body.font-childaid .ca-footer a:hover { color: var(--ca-red); }

/* ---------- Handy ---------- */
@media (max-width: 767.98px) {
  body.font-childaid .question-container { padding: 18px 16px; border-radius: var(--ca-radius-box); }
  body.font-childaid .survey-name { font-size: 2rem; }
  body.font-childaid .group-title { font-size: 1.6rem; }
  body.font-childaid #survey-nav .logo { max-height: 40px; }
}
