/* ==========================================================================
   Verifizierungsseite digitaler Schülerausweis – Friedrich-List-Berufskolleg Bonn
   Alle eigenen Klassen tragen das Präfix "flb-". Es gibt bewusst KEINE globalen
   Regeln für input/button/iframe/canvas/video und keinen *-Reset, damit das
   Modul des Anbieters (schuelerausweis.de) unbeeinflusst rendert.
   ========================================================================== */

:root {
  /* Werte stammen aus der Theme-Palette von www.flb-bonn.de (Stand 09/2026) */
  --flb-primary: #00255E;      /* Dunkelblau der Homepage (rgb 0,37,94) */
  --flb-accent: #0086CB;       /* Hellblau der Homepage (rgb 0,134,203) – nur für Linien/Rahmen, nicht für Text (Kontrast 3,9:1) */
  --flb-link: #00255E;         /* Linktext auf Weiß */
  --flb-text: #1A1A1A;
  --flb-bg: #FFFFFF;
  --flb-footer-bg: #00255E;    /* TODO: Farbe prüfen (Zuordnung zum Footer nicht sicher ermittelbar) */
  --flb-footer-text: #FFFFFF;

  /* Hilfsfarben (neutral) */
  --flb-muted-bg: #F2F2F2;
  --flb-muted-text: #4D4D4D;
  --flb-muted-border: #727272;
  --flb-box-bg: #F3F7FA;
  --flb-warn-bg: #B00020;      /* nur Testseite */
  --flb-warn-text: #FFFFFF;

  --flb-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --flb-maxwidth: 900px;
  --flb-gutter: 16px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--flb-bg);
  color: var(--flb-text);
  font-family: var(--flb-font);
  font-size: 16px;
  line-height: 1.5;
}

[class^="flb-"],
[class*=" flb-"] {
  box-sizing: border-box;
}

/* --- Seitenrahmen ------------------------------------------------------- */

.flb-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.flb-inner {
  width: 100%;
  max-width: var(--flb-maxwidth);
  margin: 0 auto;
  padding: 0 var(--flb-gutter);
}

/* --- Header ------------------------------------------------------------- */

.flb-header {
  background: var(--flb-bg);
  border-bottom: 3px solid var(--flb-accent);
}

.flb-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.flb-logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.flb-logo {
  display: block;
  height: 44px;
  width: auto;
}

.flb-school {
  margin: 0;
  color: var(--flb-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

/* --- Titelleiste -------------------------------------------------------- */

.flb-titlebar {
  background: var(--flb-primary);
  color: #FFFFFF;
}

.flb-title {
  margin: 0;
  padding: 10px 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

/* --- Hauptbereich ------------------------------------------------------- */

.flb-main {
  flex: 1 0 auto;
  padding-top: 20px;
  padding-bottom: 32px;
}

/* Container für das Anbieter-Modul: nur Abstand und Mindesthöhe (gegen
   Layout-Springen), keine Vorgaben für die Inhalte des Moduls. */
.flb-verify {
  min-height: 120px;
  margin: 0 0 24px;
}

.flb-placeholder {
  margin: 0;
  padding: 24px 16px;
  background: var(--flb-muted-bg);
  border: 1px dashed var(--flb-muted-border);
  border-radius: 4px;
  color: var(--flb-muted-text);
  text-align: center;
}

/* Hinweis ausblenden, sobald der Container weitere Kindelemente enthält */
#saw-verify:has(> :not(.flb-placeholder)) > .flb-placeholder {
  display: none;
}

/* Fallback für Browser ohne :has() – Klasse wird per JS gesetzt */
#saw-verify.flb-has-module > .flb-placeholder {
  display: none;
}

.flb-text {
  margin: 0 0 24px;
}

.flb-box {
  margin: 0 0 24px;
  padding: 16px;
  background: var(--flb-box-bg);
  border-left: 4px solid var(--flb-accent);
  border-radius: 0 4px 4px 0;
}

.flb-box__title {
  margin: 0 0 8px;
  color: var(--flb-primary);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.flb-address {
  margin: 0 0 8px;
  font-style: normal;
}

.flb-contact {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.flb-contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
}

.flb-hours {
  margin: 0;
}

.flb-hours__title {
  display: block;
  font-weight: 600;
}

.flb-privacy {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid #D6D6D6;
  color: var(--flb-muted-text);
}

/* --- Links (Touch-Ziele mind. 44px hoch) -------------------------------- */

.flb-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--flb-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.flb-nowrap {
  white-space: nowrap;
}

.flb-link:hover {
  text-decoration-thickness: 2px;
}

.flb-link:focus-visible,
.flb-logo-link:focus-visible {
  outline: 3px solid var(--flb-accent);
  outline-offset: 2px;
}

/* --- Footer ------------------------------------------------------------- */

.flb-footer {
  flex-shrink: 0;
  background: var(--flb-footer-bg);
  color: var(--flb-footer-text);
  padding: 20px 0;
}

.flb-footer__address {
  margin: 0 0 8px;
  font-style: normal;
}

.flb-footer__nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  margin: 0 0 8px;
}

.flb-footer .flb-link {
  color: var(--flb-footer-text);
}

.flb-footer .flb-link:focus-visible {
  outline-color: #FFFFFF;
}

.flb-copy {
  margin: 0;
}

/* --- Testseite (_test.html) --------------------------------------------- */

.flb-test-banner {
  margin: 0;
  padding: 12px 0;
  background: var(--flb-warn-bg);
  color: var(--flb-warn-text);
  font-weight: 700;
}

.flb-table {
  width: 100%;
  margin: 0 0 24px;
  border-collapse: collapse;
  table-layout: fixed;
}

.flb-table th,
.flb-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #D6D6D6;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.flb-table th {
  width: 38%;
  color: var(--flb-primary);
  font-weight: 600;
}

.flb-table td {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
}

.flb-table caption {
  padding: 0 0 8px;
  color: var(--flb-primary);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: left;
}

.flb-testlinks {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

/* --- Desktop ------------------------------------------------------------ */

@media (min-width: 768px) {
  :root {
    --flb-gutter: 24px;
  }

  .flb-header__inner {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .flb-logo {
    height: 56px;
  }

  .flb-school {
    font-size: 1.25rem;
  }

  .flb-title {
    padding: 14px 0;
    font-size: 1.375rem;
  }

  .flb-main {
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .flb-box {
    padding: 24px;
  }

  .flb-table th {
    width: 30%;
  }
}
