/* LiFi concept demos — gemeinsames Look & Feel.
 *
 * Die Designwerte entsprechen der Folien-Designsprache des LiFi-Projekts
 * (style.toml im Hauptprojekt): schwarzer Grund, acht Farben, Arial,
 * Roboto Mono fuer alles Zaehlbare, durchgehende Kleinschreibung.
 * Farbe ist Bedeutung, nicht Dekoration: Blau verweist, Gelb merkt an,
 * Rot ist der sparsame Hingucker. */

:root {
  --bg: #000000;
  --white: #ffffff;
  --gray-light: #b6bec6;
  --gray: #7d868f;
  --gray-dark: #4a5259;
  --blue: #009ee3;
  --green: #4ade80;
  --yellow: #ffd23f;
  --red: #ff4d6d;
  --font: Arial, "Helvetica Neue", sans-serif;
  --mono: "Roboto Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--mono); }

/* Seitenrahmen: schmale Kopfzeile, Inhalt mittig, Fusszeile */
.demo-topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 22px;
  font-size: 13px;
  color: var(--gray);
}

main {
  flex: 1;
  width: min(960px, 100% - 32px);
  margin: 0 auto;
  padding: 8px 0 32px;
}

h1 {
  font-size: 40px;
  font-weight: normal;
  margin: 12px 0 2px;
}

.subtitle { color: var(--gray); margin: 0 0 28px; font-size: 16px; }

.demo-footer {
  padding: 14px 22px 18px;
  font-size: 13px;
  color: var(--gray);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

/* Uebersichtsseite */
/* Uebersichtsseite: Suchfeld, Konzept-Labels und das Kartenraster. */
main.overview { max-width: 1240px; }
.filter { margin: 0 0 20px; }
.search input {
  width: 100%;
  font: 16px var(--mono);
  color: var(--white);
  background: var(--bg);
  border: 1px solid var(--gray-dark);
  border-radius: 8px;
  padding: 11px 14px;
  outline: none;
}
.search input:focus { border-color: var(--blue); }
.search input::placeholder { color: var(--gray-dark); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  font: 13px var(--mono);
  color: var(--gray-light);
  background: var(--bg);
  border: 1px solid var(--gray-dark);
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  white-space: nowrap;
}
.tag:hover { border-color: var(--gray-light); color: var(--white); }
.tag.is-active { border-color: var(--yellow); color: var(--yellow); }
.count { color: var(--gray); font-size: 14px; margin: 12px 2px 0; min-height: 1.2em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-dark);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.card[hidden] { display: none; }
.card:hover, .card:focus-within { border-color: var(--blue); }
.card .thumb { display: block; background: var(--bg); border-bottom: 1px solid var(--gray-dark); }
.card .thumb img { display: block; width: 100%; height: auto; aspect-ratio: 600 / 245; object-fit: cover; }
.card .body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card .body .tag { align-self: flex-start; }
.card .name { font-size: 20px; color: var(--white); }
.card:hover .name { color: var(--blue); }
.card .desc { color: var(--gray); font-size: 14px; margin: 0; }
.empty { color: var(--gray); font-size: 16px; margin: 24px 2px; }
button.link { font: inherit; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; }
button.link:hover { text-decoration: underline; }
.demo-soon { color: var(--gray-dark); font-size: 14px; margin: 12px 2px; }

/* Bedienelemente: bewusst zurueckhaltend, die Sache steht im Zentrum */
button.ctrl {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--gray-light);
  background: none;
  border: 1px solid var(--gray-dark);
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
}
button.ctrl:hover { border-color: var(--gray-light); color: var(--white); }
button.ctrl:active { transform: translateY(1px); }

.hint { color: var(--gray-dark); font-size: 12px; }

/* Embed-Modus (?embed=1): fuer die Einbettung auf einer Folie bleibt nur die
 * Sache selbst; Kopfzeile, Titel, Fusszeile und Merksatz verschwinden. Jede
 * Demo darf weitere Elemente mit .embed-hide markieren. */
body.embed .demo-topbar, body.embed main > h1, body.embed main > .subtitle,
body.embed .demo-footer, body.embed .takeaway, body.embed .hint, body.embed .embed-hide { display: none !important; }
body.embed main { padding-top: 4px; }
