/*
 * Marketing Fahrschule – Theorieplan
 * Die Optik dockt an die vorhandenen --fp-* Design-Tokens der Website an.
 */
.mf-theorieplan,
.mf-theorieplan-manage {
  --mf-tp-primary: var(--fp-primary, #1f4fb8);
  --mf-tp-primary-dark: var(--fp-primary-dark, #142f73);
  --mf-tp-accent: var(--fp-accent, var(--mf-tp-primary));
  --mf-tp-text: var(--fp-text, #07080c);
  --mf-tp-text-invert: var(--fp-text-invert, #fff);
  --mf-tp-text-on-brand: var(--fp-text-on-brand, #fff);
  --mf-tp-surface: var(--fp-bg-white, #fff);
  --mf-tp-surface-alt: var(--fp-bg-light, #f3f5f9);
  --mf-tp-surface-soft: var(--fp-bg-soft, #f7f9fc);
  --mf-tp-border: var(--fp-border-light, rgba(7, 8, 12, .12));
  --mf-tp-border-soft: var(--fp-border-soft, rgba(7, 8, 12, .08));
  --mf-tp-radius: var(--fp-radius-soft, 16px);
  --mf-tp-radius-small: var(--fp-radius, 8px);
  --mf-tp-shadow: var(--fp-shadow-soft, 0 10px 24px rgba(0, 0, 0, .06));
  --mf-tp-gradient: var(--fp-gradient-brand, linear-gradient(90deg, var(--mf-tp-primary), var(--mf-tp-primary-dark)));
  --mf-tp-danger: #b42318;
  --mf-tp-danger-bg: color-mix(in srgb, var(--mf-tp-danger) 10%, var(--mf-tp-surface));
  --mf-tp-warning: #7a5900;
  --mf-tp-warning-bg: color-mix(in srgb, #d99a00 12%, var(--mf-tp-surface));
  --mf-tp-brand-text: var(--mf-tp-text-invert);
  color: var(--mf-tp-text);
  font: inherit;
  width: 100%;
  min-width: 0;
}

body.fp-theme-standard .mf-theorieplan,
body.fp-theme-standard .mf-theorieplan-manage {
  --mf-tp-brand-text: var(--mf-tp-text-invert);
}

body.fp-theme-premium .mf-theorieplan,
body.fp-theme-premium .mf-theorieplan-manage {
  --mf-tp-brand-text: var(--mf-tp-text-on-brand);
}

.mf-theorieplan *,
.mf-theorieplan-manage * {
  box-sizing: border-box;
}

.mf-theorieplan__next {
  padding: clamp(20px, 3vw, 34px);
  margin: 0 0 28px;
  border: 1px solid var(--mf-tp-border);
  border-radius: var(--mf-tp-radius);
  background: var(--mf-tp-surface);
  box-shadow: var(--mf-tp-shadow);
}

.mf-theorieplan__eyebrow,
.mf-theorieplan-manage__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--mf-tp-primary);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mf-theorieplan__next-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) minmax(150px, .8fr) minmax(220px, 1.4fr);
  gap: 20px;
  align-items: center;
}

.mf-theorieplan__next-grid > div {
  min-width: 0;
}

.mf-theorieplan__next-grid strong,
.mf-theorieplan__next-grid span {
  display: block;
  overflow-wrap: anywhere;
}

.mf-theorieplan__next-grid strong {
  margin-bottom: 4px;
  font-size: clamp(1rem, .95rem + .25vw, 1.18rem);
}

.mf-theorieplan__navigation {
  margin-bottom: 22px;
}

.mf-theorieplan__tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.mf-theorieplan__tab {
  appearance: none;
  border: 1px solid var(--mf-tp-border) !important;
  border-radius: var(--mf-tp-radius-small);
  background: var(--mf-tp-surface-alt) !important;
  background-image: none !important;
  color: var(--mf-tp-primary) !important;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  line-height: 1.2;
  min-height: 48px;
  padding: 11px 14px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.mf-theorieplan__tab:hover,
.mf-theorieplan__tab:focus-visible {
  border-color: var(--mf-tp-primary) !important;
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mf-tp-primary) 14%, transparent);
}

.mf-theorieplan__tab.is-active {
  border-color: transparent !important;
  background: var(--mf-tp-gradient) !important;
  background-image: var(--mf-tp-gradient) !important;
  color: var(--mf-tp-brand-text, var(--mf-tp-text-invert)) !important;
}

.mf-theorieplan__mobile-nav {
  display: none;
  width: min(100%, 304px);
  margin-inline: auto;
  grid-template-columns: var(--mf-tp-arrow-size, 46px) minmax(0, 1fr) var(--mf-tp-arrow-size, 46px);
  justify-content: center;
  gap: 8px;
  align-items: center;
}

.mf-theorieplan__month-select {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  border: 1px solid var(--mf-tp-border);
  border-radius: var(--mf-tp-radius-small);
  background: var(--mf-tp-surface) !important;
  background-image: none !important;
  color: var(--mf-tp-text) !important;
  font: inherit;
  font-weight: 700;
  text-align: center;
  padding: 8px 28px 8px 10px;
}

.mf-theorieplan__month-arrow {
  appearance: none !important;
  position: relative;
  display: block !important;
  inline-size: var(--mf-tp-arrow-size, 46px) !important;
  block-size: var(--mf-tp-arrow-size, 46px) !important;
  width: var(--mf-tp-arrow-size, 46px) !important;
  height: var(--mf-tp-arrow-size, 46px) !important;
  min-width: var(--mf-tp-arrow-size, 46px) !important;
  min-height: var(--mf-tp-arrow-size, 46px) !important;
  max-width: var(--mf-tp-arrow-size, 46px) !important;
  max-height: var(--mf-tp-arrow-size, 46px) !important;
  aspect-ratio: 1 / 1 !important;
  place-self: center;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--mf-tp-border) !important;
  border-radius: 50% !important;
  background: var(--mf-tp-surface-alt) !important;
  background-image: none !important;
  color: var(--mf-tp-primary) !important;
  box-shadow: none !important;
  cursor: pointer;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px;
  transform: none !important;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.mf-theorieplan__month-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  inline-size: 10px;
  block-size: 10px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform-origin: center;
}

.mf-theorieplan__month-arrow[data-mf-month-prev]::before {
  transform: translate(-38%, -50%) rotate(-135deg);
}

.mf-theorieplan__month-arrow[data-mf-month-next]::before {
  transform: translate(-62%, -50%) rotate(45deg);
}

.mf-theorieplan__month-arrow:hover,
.mf-theorieplan__month-arrow:focus-visible {
  border-color: var(--mf-tp-primary) !important;
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mf-tp-primary) 14%, transparent) !important;
}

.mf-theorieplan__month-arrow:disabled {
  cursor: default;
  opacity: .35;
}

.mf-theorieplan__month[hidden] {
  display: none !important;
}

.mf-theorieplan__month-title {
  margin: 0 0 14px;
  color: var(--mf-tp-text);
  font-family: "League Gothic", sans-serif !important;
  font-size: clamp(1.25rem, 1.05rem + .7vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
}

.mf-theorieplan__table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  overflow: hidden;
  border: 1px solid var(--mf-tp-border);
  border-radius: var(--mf-tp-radius);
  background: var(--mf-tp-surface);
  box-shadow: var(--mf-tp-shadow);
}

.mf-theorieplan__table th,
.mf-theorieplan__table td {
  min-width: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--mf-tp-border-soft);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.mf-theorieplan__table th {
  background: var(--mf-tp-gradient);
  color: var(--mf-tp-brand-text, var(--mf-tp-text-invert));
  font-size: .9rem;
  font-weight: 800;
}

.mf-theorieplan__table th:nth-child(1) { width: 22%; }
.mf-theorieplan__table th:nth-child(2) { width: 18%; }
.mf-theorieplan__table th:nth-child(3) { width: 22%; }
.mf-theorieplan__table th:nth-child(4) { width: 38%; }

.mf-theorieplan__table tbody tr:last-child td {
  border-bottom: 0;
}

.mf-theorieplan__table tbody tr:nth-child(even):not(.is-cancelled) td {
  background: var(--mf-tp-surface-alt);
}

.mf-theorieplan__table td strong,
.mf-theorieplan__table td span {
  display: block;
}

.mf-theorieplan__note {
  margin-top: 3px;
  opacity: .76;
}

.mf-theorieplan__lesson-category {
  font-size: .84rem;
}

.mf-theorieplan__location {
  display: inline-flex !important;
  align-items: center;
  max-width: 100%;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--mf-tp-primary) 25%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--mf-tp-primary) 8%, var(--mf-tp-surface));
  color: var(--mf-tp-primary);
  font-size: .88rem;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mf-theorieplan__table tr.is-cancelled td {
  background: #fdf0ef;
  background: var(--mf-tp-danger-bg);
  color: var(--mf-tp-danger);
}

.mf-theorieplan__cancelled-title {
  color: var(--mf-tp-danger);
}

.mf-theorieplan__closure {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border-left: 5px solid #d99a00;
  border-radius: var(--mf-tp-radius-small);
  background: #fff8e6;
  background: var(--mf-tp-warning-bg);
  color: var(--mf-tp-text);
}

.mf-theorieplan__closure strong {
  color: var(--mf-tp-warning);
}

.mf-theorieplan__empty {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--mf-tp-border);
  border-radius: var(--mf-tp-radius-small);
  background: var(--mf-tp-surface-alt);
}

@media (max-width: 767px) {
  .mf-theorieplan__next-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mf-theorieplan__next-grid > div + div {
    padding-top: 14px;
    border-top: 1px solid var(--mf-tp-border-soft);
  }

  .mf-theorieplan__tabs {
    display: none;
  }

  .mf-theorieplan__mobile-nav {
    --mf-tp-arrow-size: clamp(42px, 12vw, 46px);
    display: grid;
    width: min(100%, 304px);
    grid-template-columns: var(--mf-tp-arrow-size) minmax(0, 1fr) var(--mf-tp-arrow-size);
    gap: 8px;
  }

  .mf-theorieplan__month-select {
    min-height: 42px;
    padding: 8px 26px 8px 10px;
    font-size: .98rem;
  }

  .mf-theorieplan__table,
  .mf-theorieplan__table thead,
  .mf-theorieplan__table tbody,
  .mf-theorieplan__table tr,
  .mf-theorieplan__table th,
  .mf-theorieplan__table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .mf-theorieplan__table {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .mf-theorieplan__table thead {
    display: none;
  }

  .mf-theorieplan__table tr {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--mf-tp-border);
    border-radius: var(--mf-tp-radius-small);
    background: var(--mf-tp-surface);
    box-shadow: var(--mf-tp-shadow);
  }

  .mf-theorieplan__table td {
    display: grid;
    grid-template-columns: minmax(82px, .75fr) minmax(0, 1.45fr);
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--mf-tp-border-soft);
    background: var(--mf-tp-surface) !important;
    text-align: left;
  }

  .mf-theorieplan__table td:last-child {
    border-bottom: 0;
  }

  .mf-theorieplan__table td::before {
    content: attr(data-label);
    min-width: 0;
    color: var(--mf-tp-text);
    font-size: .84rem;
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  .mf-theorieplan__table tr.is-cancelled td {
    background: var(--mf-tp-danger-bg) !important;
  }

  .mf-theorieplan__location {
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .mf-theorieplan__mobile-nav {
    --mf-tp-arrow-size: 42px;
    width: min(100%, 286px);
    gap: 6px;
  }

  .mf-theorieplan__month-select {
    min-height: 40px;
    padding: 7px 24px 7px 8px;
    font-size: .95rem;
  }

  .mf-theorieplan__month-arrow::before {
    inline-size: 9px;
    block-size: 9px;
    border-width: 3px;
  }
}

@media (max-width: 359px) {
  .mf-theorieplan__table td {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .mf-theorieplan__table td::before {
    color: var(--mf-tp-primary);
  }
}

/* =========================================================
   INTENSIVKURS-DATEN – ELEMENTOR WIDGET
   ========================================================= */
.mf-course-start {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-block: 8px;
  color: var(--fp-text, #07080c);
  font-family: "League Gothic", sans-serif;
  line-height: 1.15;
}

.mf-course-start__title,
.mf-course-start__date,
.mf-course-start__end-date {
  display: block;
  color: inherit;
  overflow-wrap: anywhere;
}

.mf-course-start__title {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: clamp(1.25rem, 1.05rem + .55vw, 1.7rem);
  line-height: inherit;
}

.mf-course-start__date,
.mf-course-start__end-date {
  font-size: clamp(1.15rem, 1rem + .4vw, 1.5rem);
}

/* =========================================================
   FERIENKURSE IM THEORIEPLAN
   ========================================================= */
.mf-theorieplan__next.is-intensive,
.mf-theorieplan__table tr.is-intensive td {
  background: color-mix(in srgb, var(--mf-tp-primary) 8%, var(--mf-tp-surface));
}

.mf-theorieplan__table tr.is-intensive td:first-child {
  box-shadow: inset 4px 0 0 var(--mf-tp-primary);
}

.mf-theorieplan__course-badge {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 0 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mf-tp-gradient);
  color: var(--mf-tp-brand-text, var(--mf-tp-text-invert));
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.mf-theorieplan__break-note {
  margin-top: 3px;
  font-size: .78rem;
}

@media (max-width: 767px) {
  .mf-theorieplan__table tr.is-intensive td {
    background: color-mix(in srgb, var(--mf-tp-primary) 8%, var(--mf-tp-surface)) !important;
  }

  .mf-theorieplan__table tr.is-intensive td:first-child {
    box-shadow: inset 4px 0 0 var(--mf-tp-primary);
  }
}
