:root {
  color-scheme: light;
  --bg: #fbdedb;
  --row: #ed6c66;
  --card: #e55c55;
  --card-dark: #c94545;
  --text: #111111;
  --muted: #441e1d;
  --cta: #c6000c;
  --cta-hover: #a4000c;
  --cta-active: #7a0008;
  --checkbox-fill: #c6000c;
  --cta-dark: #96000a;
  --form-bg: #f06a64;
  --form-text: #0f0a0a;
  --pill: #5a5e66;
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

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

body.fahrstunden-mode {
  color: #041b34;
}

.extended-field {
  display: flex;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero h1 {
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero p {
  margin: 0;
  font-size: 1.05rem;
  max-width: 560px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  color: var(--muted);
}

.course-table {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0 1rem;
}


.fahrstunden-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.card {
  border-radius: 28px;
  padding: 1.25rem 1.5rem;
  color: var(--text);
  background: var(--card, var(--row));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.card.row {
  display: grid;
  gap: 1rem;
  align-items: center;
  background: var(--row);
}

.course-table .row.invalid-tab,
.fahrstunden-card.invalid-tab {
  border: 2px solid #d3000f;
  box-shadow: 0 0 0 1px rgba(211, 0, 15, 0.2);
}

.row-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.95rem;
}

.row-block strong {
  font-size: 1.05rem;
  color: var(--text);
}

.row-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.row-icon {
  width: 30px;
  height: 30px;
}

.row-line .normal {
  font-weight: 400;
}

.row-line .note {
  font-weight: 400;
}

.row-dates p,
.row-times p {
  margin: 0;
  font-weight: 700;
}

.row-seats,
.row-price {
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.card.row.full {
  filter: grayscale(1);
  opacity: 0.6;
}

.card.row.full .cta {
  pointer-events: none;
  opacity: 0.8;
}

.row-action {
  display: flex;
  justify-content: flex-end;
}

.progress {
  height: 12px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.3rem;
}

.progress span {
  display: block;
  height: 100%;
  background: #fffef9;
  transition: width 0.6s ease;
}

.progress-label {
  font-size: 0.85rem;
  margin-top: 0.2rem;
  display: inline-block;
}

body.fahrstunden-mode .progress {
  background: rgba(4, 27, 52, 0.2);
}

body.fahrstunden-mode .progress span {
  background: #0b57a0;
}

body.fahrstunden-mode .progress-label {
  color: #041b34;
}

.cta {
  background: var(--cta);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cta:not(:disabled):hover {
  background: var(--cta-hover, var(--cta-dark, var(--cta)));
  transform: translateY(-1px);
}

.cta:not(:disabled):active {
  background: var(--cta-active, var(--cta-hover, var(--cta)));
  transform: translateY(0);
}

.form-panel {
  transition: max-height 220ms ease, opacity 220ms ease;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  margin-bottom: 3rem;
}

.form-panel .card {
  background: var(--form-bg);
  color: var(--form-text);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding-bottom: 3.5rem;
}

body.vku-mode .form-panel {
  margin-bottom: 4.5rem;
}

body.vku-mode .form-panel .card {
  padding-bottom: 4.5rem;
}

@media (max-width: 768px) {
  .form-panel {
    margin-bottom: 5rem;
  }
  .form-panel .card {
    padding-bottom: 6rem;
  }
  body.vku-mode .form-panel {
    margin-bottom: 10rem;
  }
  body.vku-mode .form-panel .card {
    padding-bottom: 10rem;
  }
}

.form-panel.collapsed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 220ms ease, opacity 220ms ease;
}

.form-panel:not(.collapsed) {
  max-height: 999px;
  opacity: 1;
  pointer-events: auto;
}

.course-summary {
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem 1rem;
  border-radius: 18px;
}

.course-summary h2 {
  margin: 0 0 0.3rem;
}

.course-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.course-summary-grid strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.75);
}

.course-summary-grid p {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .form-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.form-grid .postal-city,
.form-grid .name-pair {
  display: contents;
}

body.fahrstunden-mode .form-grid {
  grid-template-columns: 1fr;
}

body.fahrstunden-mode .form-grid .postal-city,
body.fahrstunden-mode .form-grid .name-pair {
  display: block;
}

@media (min-width: 900px) {
  body.fahrstunden-mode .form-grid .postal-city {
    display: block;
  }

  body.fahrstunden-mode .form-grid .name-pair {
    display: block;
  }
}

.form-panel label {
  color: var(--form-text);
}

.ausweis-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;          /* Abstand zwischen Text und Input */
  flex-wrap: nowrap;     /* NICHT umbrechen */
  font-size: 0.9rem;     /* hier kannst du den Text bei Bedarf etwas verkleinern */
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

label.full {
  grid-column: 1 / -1;
}


.form-panel input,
.form-panel select,
.form-panel textarea {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 20px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #111;
}

.form-panel input.invalid,
.form-panel select.invalid,
.form-panel textarea.invalid {
  border: 2px solid #d3000f;
  box-shadow: 0 0 0 1px rgba(211, 0, 15, 0.25);
  color: #d3000f;
}

.form-panel label.label-invalid {
  color: #d3000f;
}

textarea {
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkbox {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0.5rem 0;
  font-size: 0.95rem;
  flex-wrap: wrap;
  white-space: normal;
  align-self: flex-start;
  justify-content: flex-start;
  width: 100%;
}

.checkbox input {
  appearance: none;
  width: 1.25rem;
  height: 2.25rem;
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  transition: border 120ms ease, background 120ms ease;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 75%;
}

.checkbox span {
  display: inline;
  line-height: 1.4;
  word-break: break-word;
}



.checkbox input::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.checkbox input::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.checkbox input:checked::before,
.checkbox input:checked::after {
  opacity: 1;
}

.checkbox input:checked {
  border-color: var(--checkbox-fill, var(--cta));
  background: var(--checkbox-fill, var(--cta));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolyline points='4 13 9 18 20 6' fill='none' stroke='white' stroke-width='3' stroke-linecap='butt' stroke-linejoin='miter'/%3E%3C/svg%3E");
}

.checkbox input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(198, 0, 12, 0.2);
}

.checkbox.invalid span {
  color: #d3000f;
}

.checkbox.invalid input {
  border-color: #d3000f;
  box-shadow: 0 0 0 2px rgba(211, 0, 15, 0.25);
}

.checkbox a {
  color: inherit;
  text-decoration: underline;
}

#feedback {
  min-height: 1.5rem;
  font-weight: 600;
}

#feedback.error {
  color: #d3000f;
}

#feedback.success {
  color: #00a86b;
}

.global-notice {
  display: none;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.global-notice.show {
  display: block;
}

.global-notice.success {
  background: #e8f7ee;
  color: #0f5132;
}

.global-notice.error {
  background: #fde8e6;
  color: #b02a37;
}

.placeholder {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.form-panel .placeholder {
  color: rgba(0, 0, 0, 0.55);
}

.muted {
  opacity: 0.8;
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 900px) {
  .card.row {
    grid-template-columns: 2.2fr 2fr 0.7fr 0.9fr 1fr;
  }

  .row-action {
    justify-content: flex-end;
  }
}

@media (max-width: 899px) {
  .card.row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .row-action {
    justify-content: flex-start;
  }
}

.fahrstunden-card {
  flex: 1 1 320px;
  min-width: 300px;
  background-color: #6ea4cc;
  border-radius: 32px;
  padding: 1.5rem;
  color: #051933;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.fahrstunden-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.fahrstunden-card strong {
  font-size: 2rem;
}

.fahrstunden-card .cta {
  margin-top: 1rem;
  background: #0b57a0;
}

.fahrstunden-card.with-form {
  flex: 1 1 320px;
}

.fahrstunden-card.with-form #form-section {
  width: 100%;
}

.fahrstunden-card.with-form #form-section .card {
  background: transparent;
  padding: 0;
  box-shadow: none;
  color: inherit;
}
