/* Vereinsbus-Buchungstool - Dark theme matching the rugbyunion.de corporate
   design (CI values taken from the club's Aufnahmeantrag plugin: Anton/Inter,
   CI black #1c1b17, red #db261e, green #01923f). Kept as plain CSS with the same
   class names, so no template changes are needed. */

/* Self-hosted club fonts (latin subset, incl. German umlauts + ß). Downloaded
   once from Google and served from our own origin, so no request goes to Google
   from the visitor's browser (DSGVO). Inter v20 is a variable font - one file
   covers the whole 400-700 weight range. */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/anton-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/inter.woff2') format('woff2');
}

:root {
  --black:      #1c1b17;   /* CI black - page background */
  --black-2:    #141310;   /* darker */
  --rot:        #db261e;   /* CI red */
  --gruen:      #01923f;   /* CI green - primary action */
  --gruen-h:    #02b34d;   /* lighter green - hover/links */
  --field-bg:   #2a2a26;   /* dark input fields */
  --field-bd:   #44443e;   /* borders */
  --white:      #ffffff;
  --text:       #ececec;   /* light text on dark */
  --muted:      #9a9a92;   /* muted light text */
  --label:      #b8b8ae;   /* form labels */
  --err:        #ff6b5e;   /* error red on dark */
  --r:          6px;

  /* Hint native controls (date pickers, scrollbars) to render dark. */
  color-scheme: dark;
}

/* Set the dark background on the root element too - body is only 900px wide and
   centered, so without this the canvas beside it (and any embedding iframe wider
   than 900px) would stay browser-default white. */
html {
  background: var(--black);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
}

h2, h3 {
  font-family: 'Anton', 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

a {
  color: var(--gruen-h);
}
a:hover {
  color: var(--white);
}

header {
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--gruen);
  padding-bottom: 0.5rem;
}
header h1 {
  font-family: 'Anton', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: inline-block;
}
header h1 a {
  text-decoration: none;
  color: var(--white);
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}
th, td {
  border: 1px solid var(--field-bd);
  padding: 0.4rem 0.6rem;
  text-align: left;
}
th {
  background: var(--field-bg);
  color: var(--text);
}

/* --- Forms --- */
form label {
  display: inline-block;
  margin: 0.3rem 0.6rem 0.3rem 0;
  color: var(--label);
}
input, select, textarea {
  font: inherit;
  background: var(--field-bg);
  color: var(--text);
  border: 1px solid var(--field-bd);
  border-radius: var(--r);
  padding: 0.4rem 0.5rem;
  margin-top: 0.15rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gruen-h);
}
button {
  cursor: pointer;
  font: inherit;
  background: var(--gruen);
  color: var(--white);
  border: none;
  border-radius: var(--r);
  padding: 0.45rem 1.1rem;
  margin-top: 0.5rem;
}
button:hover {
  background: var(--gruen-h);
}

.fehler {
  color: var(--err);
  font-weight: bold;
}
.erfolg {
  color: var(--gruen-h);
  font-weight: bold;
}
.hinweis {
  color: var(--muted);
  font-style: italic;
}

/* --- Kalender --- */
.kal-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.kal-kopf h2 {
  margin: 0;
}
table.kalender {
  table-layout: fixed;
}
table.kalender th {
  text-align: center;
  background: var(--field-bg);
}
table.kalender td {
  height: 5rem;
  vertical-align: top;
  padding: 0.2rem;
}
.kal-fremd {
  background: var(--black-2);
  color: #6a6a63;
}
.kal-heute {
  outline: 2px solid var(--gruen-h);
  outline-offset: -2px;
}
.kal-tag {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.15rem;
  color: var(--text);
}
.kal-eintrag {
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  margin-bottom: 0.1rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kal-titel {
  opacity: 0.85;
}
/* Status tints tuned for the dark background (dark fill + light label). */
.kal-confirmed { background: #14532a; color: #d7f0df; }
.kal-pending   { background: #4a3a12; color: #f0dca0; }
.kal-gesperrt  { background: #333330; color: #cfcfc8; font-style: italic; }
.kal-legende {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}
.kal-legende .kal-eintrag {
  display: inline-block;
  white-space: nowrap;
}
