@charset "UTF-8";
:root {
  /* Basisfarben */
  --color-background: #121212;
  --color-foreground: #e0e0e0;
  --color-link: #8ab4f8;
  --color-accent: #8ab4f8;
  --color-accent-secondary: #d24547;
  /* zusätzliche Token */
  --color-card: #262626;
  --color-muted: #888888;
  --color-muted-bg: #171717;
}

/* Abstandswerte als CSS‑Variablen (Spacing‑Token)
   bitte prinzipiell nur diese verwenden statt harter Pixelwerte */
:root {
  --space-xs: 4px;
  --space-2xs: 12px; /* kleiner Zwischenwert, z.B. für Gaps */
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  /* Weitere Größen (xxl etc.) nach Bedarf hinzufügen. */
}

/* Schrift‑Token und Schriftfamilien */
:root {
  --font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* Bei Bedarf weitere font‑Token wie --font-monospace hinzufügen */
}

/* Basis-Reset, Box-Sizing und Grundtypen */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-family);
  line-height: 1.6;
}

/* Grundlegende Typografie und Font-Fallbacks */
body {
  margin: 0;
  font-size: 14px;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-size: 40px;
  margin: 8px 0 0;
  font-weight: 800;
}

.tagline {
  color: var(--color-muted);
  margin-top: 4px;
  font-size: 14px;
}

.hint, #save-text {
  color: var(--color-muted);
  font-size: 13px;
  margin-top: 8px;
}

/* zentrales Layout-Element für begrenzte Breite */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

/* Komponenten */
/* Header-, Main- und Footer-Styles
   Klassen sollten beschreibend und konfliktarm bleiben (z.B. BEM-ähnlich
   benennen: `.site-header__logo`, `.site-header--dark` usw.).
*/
header,
.site-header {
  text-align: center;
  padding: 2rem 1rem;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1rem;
  color: #aaa;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #777;
}

.logo {
  font-weight: 700;
  font-size: 24px;
  color: var(--color-accent);
}

/* Stil für Link-Kacheln ("tools") */
.tool {
  display: block; /* anchors sind standardmäßig inline */
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: #1e1e1e;
  border-radius: 6px;
  transition: background-color 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-link);
}

.tool:hover {
  background-color: #2c2c2c;
}

.tool .tool-name {
  font-size: 1.2rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.tool p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #ccc;
}

/* Kachel-Komponenten und Ergebnisanzeigen */
.card {
  background: var(--color-card);
  border-radius: 8px;
  padding: var(--space-lg);
}

.search-card {
  display: flex;
  gap: var(--space-2xs);
  flex-wrap: wrap;
}

.results-card {
  margin-top: var(--space-lg);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-foreground);
}

.empty {
  color: var(--color-muted);
  padding: var(--space-md) 0;
  text-align: center;
}

@media (max-width: 620px) {
  .search-card {
    padding: 12px;
  }
}
/* Formulare und Eingabeelemente */
.controls {
  display: flex;
  gap: var(--space-2xs);
  width: 100%;
  align-items: stretch; /* ensure children take same height */
}

input[type=search] {
  flex: 1;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--color-muted-bg);
  color: var(--color-foreground);
  outline: none;
  font-size: 14px; /* ensure consistent height for flex alignment */
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input:focus {
  box-shadow: 0 0 0 1px var(--color-accent);
  border-color: var(--color-accent);
}

button {
  background: var(--color-accent);
  color: #000;
  padding: 0 16px; /* vertical padding removed, height controlled by flex */
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  height: 100%;
}

button:active {
  transform: translateY(1px);
}

@media (max-width: 620px) {
  .controls {
    flex-direction: column;
  }
  button {
    width: 100%;
  }
}
/* Tabellen für Ergebnislisten */
.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.results-table th {
  color: var(--color-muted);
  font-weight: 600;
  font-size: 13px;
}

.results-table tr:last-child td {
  border-bottom: none;
}

/* Hilfen / Utilities */
/* Hilfsklassen */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* utility class for hiding elements */
.hidden {
  display: none !important;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

/* Margin helpers (nur ein paar Beispiele, lasse sich erweitern) */
.mt-1 {
  margin-top: var(--space-xs);
}

.mt-2 {
  margin-top: var(--space-sm);
}

.mt-3 {
  margin-top: var(--space-md);
}

.mb-1 {
  margin-bottom: var(--space-xs);
}

.mb-2 {
  margin-bottom: var(--space-sm);
}

.mb-3 {
  margin-bottom: var(--space-md);
}

/* weitere module können hier ergänzt werden */
input[type=number] {
  width: 30px;
  text-align: center;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--color-muted-bg);
  color: var(--color-foreground);
}
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type=checkbox] {
  width: 15px;
  height: 15px;
  /* use accent-color so the box and checkmark match our theme */
  accent-color: var(--color-accent);
  margin-top: -2px;
  vertical-align: middle; /* keep checkbox centered in its table cell */
  /* neutral background when unchecked */
  background-color: var(--color-muted-bg);
}
input[type=checkbox]:checked {
  background-color: var(--color-accent);
}
input[type=checkbox].row-check:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
input.row-count[readonly] {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-muted);
  cursor: default;
}
input.row-count[readonly]:focus {
  outline: none;
  box-shadow: none;
}

.desc {
  position: relative;
}
.desc a {
  color: var(--color-foreground);
  text-decoration: none;
}

.tool {
  margin-bottom: 0px;
  padding-top: 0.5em;
  padding-bottom: 0.3em;
}

.info {
  display: inline-block;
  margin-left: var(--space-sm);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-muted);
  color: var(--color-foreground);
  text-align: center;
  line-height: 19px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.info::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  width: 500px;
  transform: translateX(-50%);
  bottom: calc(100% + 10px);
  white-space: wrap;
  background: var(--color-muted-bg);
  text-align: left;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-foreground);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.info:hover::after {
  opacity: 1;
}

/* ensure value cells are always right-aligned, applying to the <td> element
   as well as any child with class="value" */
#items-table td.value,
.value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#summary {
  padding: 12px;
  bottom: 10px;
  background: var(--color-muted-bg);
  border-radius: 6px;
  color: var(--color-accent);
  font-weight: 600;
  text-align: right;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 40px);
  max-width: 900px;
}

#save-text {
  text-align: right;
  font-weight: 300;
}

.card {
  margin-bottom: 80px;
}

@media (max-width: 560px) {
  input[type=number] {
    width: 56px;
  }
  .info::after {
    font-size: 12px;
  }
  main {
    padding-bottom: 88px;
  }
}
/* focus outlines */
input:focus,
input.row-count:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--color-accent);
  border-color: var(--color-accent);
}
