/* ==========================================================================
   Malik Akademie – Komponenten für Termine, Buchung, Förderung
   Ergänzt theme.css und nutzt dieselben Tokens.
   ========================================================================== */

/* ------------------------------------------------------------- Formulare */

input[type=text], input[type=email], input[type=tel], input[type=url],
input[type=number], input[type=date], input[type=time], input[type=search],
input[type=password], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-xs);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(4, 76, 77, .12);
}
textarea { resize: vertical; line-height: 1.6; min-height: 110px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236B7B7B' stroke-width='2' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}

/* --------------------------------------------------------- Terminübersicht */

.fundnote { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.fundnote > div { flex: 1 1 460px; }

.filterbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 24px; margin-bottom: 40px;
}
.filterbar_f { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; }
.filterbar_f label {
  font-size: 13px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-3);
}
.filterbar_reset { align-self: center; font-size: 14.5px; color: var(--ink-3); }

.monthhead {
  font-size: 21px; font-weight: 800; color: var(--ink);
  margin: 44px 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--line);
}
.monthhead:first-of-type { margin-top: 0; }

.trow {
  display: grid; grid-template-columns: 84px 1fr 260px; gap: 26px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px 26px; margin-bottom: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.trow:hover { border-color: var(--sage); box-shadow: var(--sh); transform: translateY(-2px); }
.trow--zu { opacity: .72; }
.trow--zu:hover { transform: none; box-shadow: none; }

.trow_date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--teal); color: #fff; border-radius: var(--r-sm);
  padding: 14px 8px; min-height: 92px;
}
.trow_date-d { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.trow_date-m { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.trow_date-w { font-size: 12px; opacity: .75; margin-top: 2px; }

.trow_tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.trow_body h3 { font-size: 21px; margin: 0 0 5px; }
.trow_body h3 a { color: inherit; text-decoration: none; }
.trow_body h3 a:hover { color: var(--teal); }
.trow_sub { color: var(--ink-2); font-size: 15.5px; margin: 0 0 10px; }

.trow_act { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; text-align: right; }
.trow_price { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0; line-height: 1.15; letter-spacing: -.02em; }
.trow_price span { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.trow_act .btn { width: 100%; }

.fundlink { font-size: 13.5px; font-weight: 700; color: var(--ok); text-decoration: none; }
.fundlink:hover { text-decoration: underline; color: var(--ok); }

.empty {
  text-align: center; background: var(--card); border: 1px dashed var(--line-2);
  border-radius: var(--r); padding: 56px 28px;
}
.empty h2 { font-size: 23px; }
.empty p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 24px; }

/* ----------------------------------------------------------------- Buchung */

.book { display: grid; grid-template-columns: 1fr 380px; gap: 34px; align-items: start; }
.book_form { display: grid; gap: 22px; }

.fieldset {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px 30px; margin: 0;
}
.fieldset legend {
  display: flex; align-items: center; gap: 12px; padding: 0;
  font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px;
}
.fieldset_num {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: 15px; font-weight: 800;
}

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f { display: flex; flex-direction: column; gap: 6px; }
.f--wide { grid-column: 1 / -1; }
.f label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.f abbr { color: var(--err); text-decoration: none; }
.f_hint { font-size: 13px; color: var(--ink-3); }
.f_hint a { color: var(--teal); }

.more { margin-top: 18px; }
.more summary { font-size: 15px; font-weight: 700; color: var(--teal); cursor: pointer; margin-bottom: 14px; }

.persons { display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 10px; }
.addrow {
  justify-self: start; margin-top: 12px; padding: 10px 18px;
  background: transparent; border: 1.5px dashed var(--line-2); border-radius: var(--r-xs);
  color: var(--teal); font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.addrow:hover { border-color: var(--teal); background: var(--sage-50); }

.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: 15.5px; color: var(--ink-2); }
.check input { margin-top: 3px; width: 19px; height: 19px; flex: 0 0 19px; accent-color: var(--teal); }
.check abbr { color: var(--err); text-decoration: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.smallprint { font-size: 13.5px; color: var(--ink-3); text-align: center; margin: 12px 0 0; }

.book_side { position: sticky; top: 96px; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: var(--sh); }
.summary h2 { font-size: 21px; margin-bottom: 8px; }
.summary_kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-600); margin: 0 0 8px; }
.summary_sub { color: var(--ink-2); font-size: 15px; margin: 0 0 18px; }
.summary_meta { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.summary_meta li { display: grid; gap: 2px; }
.summary_meta span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.summary_meta strong { font-size: 15px; font-weight: 700; }

.price { border-top: 1px solid var(--line); padding-top: 18px; }
.price_row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.price_row strong { font-size: 18px; font-weight: 700; color: var(--ink); }
.price_row--total { padding-top: 10px; border-top: 1px dashed var(--line); }
.price_row--total strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.price_note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; }

.fundbox { background: var(--ok-bg); border: 1px solid rgba(18, 133, 92, .22); border-radius: var(--r-sm); padding: 16px 18px; margin-top: 18px; }
.fundbox_h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; font-weight: 800; color: #0B3D22; margin: 0 0 8px; }
.fundbox_calc { font-size: 15px; color: #14532D; margin: 0 0 8px; }
.fundbox_calc strong { font-size: 20px; font-weight: 800; }
.fundbox_calc s { opacity: .6; }
.fundbox_small { font-size: 12.5px; line-height: 1.6; color: #2F6B4C; margin: 0; }
.fundbox_small a { color: #0B6B43; font-weight: 700; }

.trust { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; }
.trust li { position: relative; padding-left: 26px; font-size: 14.5px; color: var(--ink-2); }
.trust li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* ------------------------------------------------------------ Bestätigung */

.done { max-width: 760px; margin: 0 auto; text-align: center; }
.done_ico {
  width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal); color: var(--amber); font-size: 30px; font-weight: 700;
}
.done_lead { font-size: 18px; color: var(--ink-2); margin-bottom: 30px; }
.done_card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px; text-align: left; margin-bottom: 34px; box-shadow: var(--sh-sm);
}
.done_meta { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.done_meta li { display: grid; gap: 3px; }
.done_meta span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.done_meta strong { font-size: 15px; }
.done .steps { text-align: left; margin-bottom: 30px; }
.done_help { font-size: 15px; color: var(--ink-2); margin-bottom: 26px; }

/* -------------------------------------------------------------- Förderung */

.fundgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 24px; }
.fundcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 30px; display: flex; flex-direction: column; box-shadow: var(--sh-sm);
}
.fundcard_rate {
  align-self: flex-start; display: grid; margin-bottom: 18px; padding: 10px 18px;
  background: var(--teal); color: #fff; border-radius: var(--r-sm);
}
.fundcard_rate b { font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.fundcard_rate span { font-size: 12px; opacity: .85; }
.fundcard h3 { font-size: 21px; margin-bottom: 4px; }
.fundcard_meta { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.fundcard p { font-size: 15.5px; color: var(--ink-2); }
.fundcard dl { margin: 0 0 16px; display: grid; gap: 10px; }
.fundcard dt { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--amber-600); }
.fundcard dd { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-2); }
.fundcard_more summary { font-size: 14px; font-weight: 700; color: var(--teal); cursor: pointer; }
.fundcard_more p { margin-top: 10px; font-size: 14.5px; }
.fundcard_act { margin-top: auto; padding-top: 16px; display: grid; gap: 8px; justify-items: start; }
.fundcard_ext { font-size: 13px; color: var(--ink-3); }

.disclaimer {
  max-width: 900px; margin: 36px auto 0; padding: 18px 22px;
  background: rgba(6, 20, 20, .04); border-radius: var(--r-sm);
  font-size: 13.5px; line-height: 1.7; color: var(--ink-2);
}

/* ------------------------------------------------------------------ Mobil */

@media (max-width: 1080px) {
  .book { grid-template-columns: 1fr; }
  .book_side { position: static; order: -1; }
}

@media (max-width: 860px) {
  .trow { grid-template-columns: 72px 1fr; gap: 18px; }
  .trow_act { grid-column: 1 / -1; align-items: stretch; text-align: left; border-top: 1px solid var(--line); padding-top: 16px; }
  .fgrid, .person { grid-template-columns: 1fr; }
  .fundnote { flex-direction: column; align-items: flex-start; }
  .fundnote > div { flex: 0 1 auto; }
}

@media (max-width: 620px) {
  .fieldset { padding: 22px 18px; }
  .trow { padding: 20px 18px; }
  .filterbar { padding: 18px; }
  .done_meta { grid-template-columns: 1fr; }
}
