/* ===========================================================================
   Encode Sans Semi Condensed - Webschrift der Stadt Bad Wurzach (CD-Manual)
   Selbst gehostet: keine Requests an Google Fonts zur Laufzeit (DSGVO).
   Quelle: Google Fonts (SIL Open Font License 1.1), Subsets latin + latin-ext.
   =========================================================================== */

@font-face {
  font-family: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-400-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: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-400-latin-ext.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: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-500-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: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-500-latin-ext.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: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-700-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: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-700-latin-ext.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: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-800-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: 'Encode Sans Semi Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../files/fonts/EncodeSansSemiCondensed-800-latin-ext.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;
}

/* ===========================================================================
   (b) CI-Tokens der Stadt Bad Wurzach
   Quelle: CD-Manual Bad Wurzach, Stand Dezember 2025 (Primaerfarben S. 28,
   Schriftfarben S. 30, Webschrift S. 26).
   Gewichtung "Verwaltungsmarke": heller Grund, viel Weissraum,
   Markenfarben nur als Akzent.
   =========================================================================== */
:root {
  --bw-primary: #0D2E4E;        /* Dunkelblau - Hauptmarkenfarbe */
  --bw-primary-dark: #081c30;   /* dunklere Stufe fuer Hover/Active */
  --bw-secondary: #008577;      /* Petrol - Links und sekundaere Akzente.
                                   Der Manual-Wert #008677 liegt auf Weiss bei
                                   4,49:1 und verfehlt die 4,5:1 nach BITV 2.0 /
                                   WCAG 2.1 AA um 0,01. Ein Schritt im Gruenkanal
                                   ergibt 4,54:1 und ist optisch nicht vom
                                   Originalton zu unterscheiden. Als Flaeche
                                   (weisse Schrift auf Petrol) bleibt #008677
                                   unveraendert zulaessig. */
  --bw-secondary-dark: #006b5f; /* Petrol Hover */
  --bw-accent: #BBCF00;         /* Gruen - nur Akzentflaechen und Text auf
                                   dunklem Grund, nie auf Weiss. */
  --bw-claim-on-light: var(--bw-primary);
                                /* Claim auf hellem Grund. Das Gruen #BBCF00
                                   erreicht auf Weiss nur 1,74:1 und reisst damit
                                   auch die 3:1 fuer Grosstext deutlich. Auf
                                   dunkelblauem Grund traegt es 7,93:1 und bleibt
                                   dort gesetzt (siehe Anmeldeseite). */
  --bw-bg: #FFFFFF;
  --bw-text: #000000;           /* Manual: "Schwarz" fuer Fliesstext auf hellem Grund */
  --bw-text-muted: #5a6472;
  --bw-link: var(--bw-secondary);
  --bw-border: #e3e7ec;
  --bw-radius: 8px;
  --bw-font: "Encode Sans Semi Condensed", "Fira Sans", system-ui, sans-serif;
}

/* ===========================================================================
   (c) Basis-Ueberschreibungen
   =========================================================================== */

/* Das Elternthema setzt die Schrift ueber `body { font-family: "IBMPlexSans" }`
   und ueber die Font-Pakete als `body.font-<name>`. Der Doppelselektor
   `body, body[class]` erreicht Spezifitaet (0,1,1) und schlaegt beide,
   ohne !important zu brauchen. */
body,
body[class] {
  font-family: var(--bw-font);
  background-color: var(--bw-bg);
  color: var(--bw-text);
}

/* Hinweis: body { padding-top } wird vom Elternthema per JavaScript auf die
   tatsaechliche Hoehe der fixierten Navbar gesetzt (siehe Kommentar in
   subviews/footer/footer.twig des Elternthemas). Deshalb wird hier bewusst
   KEIN padding-top gesetzt - das wuerde die Berechnung doppeln. Die 4px
   Akzentlinie der Navbar zaehlen zur gemessenen Hoehe dazu. */

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
  font-family: var(--bw-font);
  color: var(--bw-primary);
  font-weight: 700;
}

/* Willkommensbildschirm: Umfragetitel kommt im Elternthema als
   `.large-heading` in IBM Plex Serif - hier auf die CI-Schrift/-Farbe ziehen. */
h1.survey-name,
h1.survey-name.large-heading,
.survey-name,
.large-heading {
  font-family: var(--bw-font);
  color: var(--bw-primary);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.25;
}

.question-title,
.group-title,
.question-container .question-title-container,
.question-container .ls-label-question,
.group-container .group-title {
  color: var(--bw-primary);
  font-weight: 700;
}

/* Links: Petrol. Gruen (#BBCF00) waere auf Weiss zu kontrastarm und ist
   laut Manual nur Akzentfarbe. */
a {
  color: var(--bw-link);
}

a:hover,
a:focus {
  color: var(--bw-secondary-dark);
  text-decoration: underline;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  border-radius: var(--bw-radius);
  font-family: var(--bw-font);
  font-weight: 500;
}

.btn-primary {
  background-color: var(--bw-primary);
  border-color: var(--bw-primary);
  color: #ffffff;
}

/* Das Elternthema haelt den Hover-Hintergrund gleich und legt nur einen
   violetten Schein darueber. Hier: echte dunklere Stufe + neutraler Fokusring
   in Dunkelblau. Selektor-Spezifitaet (0,2,0) entspricht der des Elternthemas;
   custom.css wird zuletzt geladen und gewinnt daher ohne !important. */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:active:focus {
  background-color: var(--bw-primary-dark);
  border-color: var(--bw-primary-dark);
  color: #ffffff;
  box-shadow: 0 0 0 0.25rem rgba(13, 46, 78, 0.25);
}

.btn-outline-primary {
  color: var(--bw-primary);
  border-color: var(--bw-primary);
  background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--bw-primary);
  border-color: var(--bw-primary);
  color: #ffffff;
  box-shadow: 0 0 0 0.25rem rgba(13, 46, 78, 0.25);
}

/* --- Formulare ---------------------------------------------------------- */
.form-control,
.form-select {
  border-radius: var(--bw-radius);
  font-family: var(--bw-font);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bw-primary);
  box-shadow: 0 0 0 0.25rem rgba(13, 46, 78, 0.25);
}

/* Ausgewaehlte Antworten in Dunkelblau (Bootstrap-Standard waere #0d6efd). */
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
  background-color: var(--bw-primary);
  border-color: var(--bw-primary);
}

.form-check-input:focus {
  border-color: var(--bw-primary);
  box-shadow: 0 0 0 0.25rem rgba(13, 46, 78, 0.25);
}

/* --- Fortschrittsbalken -------------------------------------------------- */
.progress-bar {
  background-color: var(--bw-primary);
  color: #ffffff;
}

/* --- Navigationsleiste --------------------------------------------------- */
#survey-nav.navbar {
  background-color: var(--bw-bg);
  border-bottom: 4px solid var(--bw-accent);
  box-shadow: none;
}

/* Logo-Hoehe: "Groesse M" des Manuals (Bildmarke ca. 20 mm). Spezifitaet
   (0,2,0) schlaegt die Elternregel `.logo-container > img` (0,1,1). */
.navbar-brand .logo {
  height: 56px;
  max-height: 56px;
  width: auto;
  padding: 4px 0;
}

@media (max-width: 575.98px) {
  .navbar-brand .logo {
    height: 40px;
    max-height: 40px;
  }
}

/* --- Fragencontainer ----------------------------------------------------- */
.question-container {
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  background-color: var(--bw-bg);
}

.group-container .group-description,
.question-container .ls-question-message {
  color: var(--bw-text-muted);
}

/* ===========================================================================
   (d) Startseite (views/layout_survey_list.twig)
   =========================================================================== */
.bw-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}

/* Doppelter Selektor (0,2,0): schlaegt `.img-fluid { max-width:100% }` aus
   theme_apple.css unabhaengig von der Ladereihenfolge. */
.bw-hero-logo,
.bw-hero .bw-hero-logo {
  max-width: min(320px, 70vw);
  width: 100%;
  height: auto;
  margin: 0 auto 1.75rem;
  display: block;
}

.bw-hero h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--bw-primary);
  margin-bottom: 0.5rem;
}

/* Claim "natuerlich . digital" - Manual: fett, kleingeschrieben.
   Farbe abhaengig vom Untergrund: auf hellem Grund Dunkelblau (13,83:1),
   auf dunkelblauem Grund Gruen (7,93:1). Gruen auf Weiss waere 1,74:1. */
.bw-claim {
  color: var(--bw-claim-on-light);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  margin-bottom: 1.5rem;
}

.bw-lead {
  max-width: 44rem;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--bw-text);
}

.bw-surveys {
  padding: 2rem 0 1rem;
}

.bw-surveys h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bw-primary);
  margin-bottom: 1.25rem;
}

.bw-survey-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.25rem;
  border-radius: var(--bw-radius);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
}

.bw-empty {
  border: 1px solid var(--bw-border);
  border-left: 4px solid var(--bw-accent);
  border-radius: var(--bw-radius);
  background-color: #f7f9fb;
  padding: 1.25rem 1.5rem;
}

.bw-empty p {
  margin-bottom: 0.5rem;
}

.bw-empty p:last-child {
  margin-bottom: 0;
  color: var(--bw-text-muted);
}

.bw-info {
  padding: 2.5rem 0 0.5rem;
  border-top: 1px solid var(--bw-border);
  margin-top: 2.5rem;
}

/* Kein kuenstlicher Leerraum zwischen Inhalt und Fusszeile auf der Startseite */
main.row[id^="surveylist"],
#surveylist-row,
.surveylistrow {
  min-height: 0;
  margin-bottom: 0;
}

.bw-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bw-primary);
  margin-bottom: 0.5rem;
}

.bw-info p {
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--bw-text-muted);
  margin-bottom: 0;
}

/* ===========================================================================
   (e) Fusszeile (Startseite und Umfrageseiten)
   =========================================================================== */
.bw-footer {
  border-top: 1px solid var(--bw-border);
  margin-top: 1.5rem;
  padding: 1.5rem 0 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--bw-text-muted);
}

.bw-footer p {
  margin-bottom: 0.5rem;
}

.bw-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
}

.bw-footer-links a {
  color: var(--bw-link);
  text-decoration: none;
}

.bw-footer-links a:hover,
.bw-footer-links a:focus {
  color: var(--bw-secondary-dark);
  text-decoration: underline;
}

/* Variante auf den Umfrageseiten: sitzt unterhalb des Inhalts, zurueckhaltend,
   mit genug Abstand, damit sie nicht unter fixierte Elemente rutscht. */
.bw-footer--survey {
  margin-top: 3rem;
  padding: 1.25rem 1rem 2.5rem;
  clear: both;
  position: relative;
  z-index: 1;
}

.bw-footer--survey p {
  margin-bottom: 0.4rem;
}

@media print {
  .bw-footer {
    display: none;
  }
}
