/* =====================================================================
   Kyrburg · Formulare 2026 (Fluent Forms), neu am 02.11.2026
   Gilt überall gleich: auf Seiten, in den Popups (.kyp-modal) und im Termin-
   Popup (.ktf-modal). Dezente Felder statt Unterlinie, Jost für alles
   Bedienbare, Cormorant nur für die Abschnitts-Köpfe. Keine Kästen um Text.
   ===================================================================== */

.fluentform {
  --kyf-tinte:   #1F2A1B;
  --kyf-leise:   #5C6455;
  --kyf-feld:    #FBF8F1;
  --kyf-linie:   rgba(31, 42, 27, .2);
  --kyf-trenner: rgba(31, 42, 27, .13);
  --kyf-gruen:   #11370B;
  --kyf-gold:    #8A5F25;
  --kyf-rot:     #9A3B2F;
  --kyf-sans:    'Kyrburg Jost', 'Helvetica Neue', Arial, sans-serif;
  --kyf-serif:   'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  --kyf-tempo:   .2s ease;
}

/* ---------------------------------------------------------------- Raster */
/* Sechs Spalten: ky-halb nimmt drei, ky-drittel zwei, alles andere die volle Breite. */
.fluentform form > fieldset {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 14px;
  align-items: start;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
.fluentform form > fieldset > * { grid-column: 1 / -1; min-width: 0; }
.fluentform form > fieldset > legend {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.fluentform .ff-el-group { margin-bottom: 0 !important; }
.fluentform .ff-el-group.ky-halb { grid-column: span 3; }
.fluentform .ff-el-group.ky-drittel { grid-column: span 2; }
.fluentform .ff-t-container { display: flex; flex-wrap: wrap; gap: 18px 14px; margin: 0 !important; }
.fluentform .ff-t-cell { flex: 1 1 190px; padding: 0 !important; min-width: 0; }

/* Bedingte Felder: Fluent Forms blendet die Gruppe aus, sie darf dann keinen Platz im Raster halten */
.fluentform .ff_excluded, .fluentform .has-conditions.ff_excluded { display: none !important; }

/* ---------------------------------------------------- Abschnitte im Formular */
.fluentform .ky-f-kopf {
  padding-top: 22px;
  margin-top: 8px !important;
  border-top: 1px solid var(--kyf-trenner);
}
.fluentform .ky-f-kopf.ky-f-erster { padding-top: 0; margin-top: 0 !important; border-top: 0; }
.fluentform .ky-f-titel,
.kyp-modal__body .fluentform .ky-f-titel,
.ktf-modal__body .fluentform .ky-f-titel {
  margin: 0;
  font-family: var(--kyf-serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--kyf-gruen);
}
.fluentform .ky-f-text,
.kyp-modal__body .fluentform .ky-f-text,
.ktf-modal__body .fluentform .ky-f-text {
  margin: 0;
  font-family: var(--kyf-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--kyf-leise);
}

/* ---------------------------------------------------------- Beschriftungen */
.fluentform .ff-el-input--label { margin-bottom: 6px !important; padding: 0; }
.fluentform .ff-el-input--label label,
.fluentform .ff-t-cell .ff-el-input--label label {
  font-family: var(--kyf-sans) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  color: var(--kyf-tinte) !important;
}
.fluentform .ff-el-is-required.asterisk-right label::after,
.fluentform .ff-el-is-required.asterisk-left label::before { content: none !important; }
/* Pflicht bleibt unmarkiert, die wenigen freiwilligen Felder sagen es selbst */
.fluentform .ff-el-input--label:not(.ff-el-is-required) label::after {
  content: ' (optional)' !important;
  font-family: var(--kyf-sans);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--kyf-leise);
}
.fluentform .fluent-address > .ff-el-input--label label::after { content: none !important; }

.fluentform .ff-el-help-message,
.fluentform .ff-el-input--label .ff-el-help-message {
  margin: 6px 0 0;
  font-family: var(--kyf-sans);
  font-size: 13.5px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kyf-leise);
}

/* ----------------------------------------------------------- Eingabefelder */
.fluentform .ff-el-form-control {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px !important;
  background-color: var(--kyf-feld) !important;
  border: 1px solid var(--kyf-linie) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  outline: none;
  font-family: var(--kyf-sans) !important;
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.4;
  color: var(--kyf-tinte) !important;
  transition: border-color var(--kyf-tempo), box-shadow var(--kyf-tempo);
}
.fluentform .ff-el-form-control:hover { border-color: rgba(31, 42, 27, .38) !important; }
.fluentform .ff-el-form-control:focus,
.fluentform .ff-el-form-control:focus-visible {
  border-color: var(--kyf-gruen) !important;
  box-shadow: 0 0 0 3px rgba(17, 55, 11, .12) !important;
  outline: none !important;
  background-color: #FFFDF8 !important;
}
.fluentform .ff-el-form-control::placeholder {
  font-family: var(--kyf-sans);
  font-style: normal;
  font-weight: 400;
  color: rgba(92, 100, 85, .8);
}
.fluentform textarea.ff-el-form-control { min-height: 104px; resize: vertical; }

.fluentform select.ff-el-form-control {
  background-color: var(--kyf-feld) !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 36px !important;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2311370B' stroke-width='1.4' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px 8px !important;
}
.fluentform input[type=number].ff-el-form-control { -moz-appearance: textfield; }
.fluentform input[type=number].ff-el-form-control::-webkit-outer-spin-button,
.fluentform input[type=number].ff-el-form-control::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fluentform .ff-el-datepicker { cursor: pointer; }

/* Vom Kalender angelegtes Zweitfeld (mobil) */
.fluentform input.flatpickr-mobile { min-height: 48px; }

/* -------------------------------------------------------------- Anschrift */
/* Straße volle Breite, darunter PLZ und Ort, dann das Land. Fluent Forms verteilt die Felder
   paarweise in zwei Reihen, deshalb löst display:contents die Reihen auf. */
.fluentform .fluent-address > .ff-el-input--content {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 14px;
}
.fluentform .fluent-address .ff-t-container { display: contents; }
.fluentform .fluent-address .ff-t-cell { grid-column: 1 / -1; }
.fluentform .fluent-address .ff-t-cell:has(input[name$="[zip]"]) { grid-column: span 2; }
.fluentform .fluent-address .ff-t-cell:has(input[name$="[city]"]) { grid-column: span 4; }

/* -------------------------------------------------------- Ja-Nein-Auswahl */
.fluentform .ky-wahl .ff-el-input--content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fluentform .ky-wahl .ff-el-form-check { margin: 0 !important; }
.fluentform .ky-wahl .ff-el-form-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  min-height: 56px;
  margin: 0;
  padding: 11px 13px;
  background: var(--kyf-feld);
  border: 1px solid var(--kyf-linie);
  border-radius: 8px;
  font-family: var(--kyf-sans) !important;
  font-size: 15px !important;
  font-weight: 400;
  line-height: 1.3 !important;
  color: var(--kyf-tinte) !important;
  cursor: pointer;
  transition: border-color var(--kyf-tempo), box-shadow var(--kyf-tempo), background-color var(--kyf-tempo);
}
.fluentform .ky-wahl .ff-el-form-check-label:hover { border-color: rgba(31, 42, 27, .38); }
.fluentform .ky-wahl input[type=radio] {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex: 0 0 auto;
  width: 19px !important;
  height: 19px !important;
  min-width: 19px;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  background-image: none !important;
  border: 1.5px solid rgba(31, 42, 27, .45) !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  outline: none;
  cursor: pointer;
}
.fluentform .ky-wahl input[type=radio]::before, .fluentform .ky-wahl input[type=radio]::after { content: none !important; display: none !important; }
.fluentform .ky-wahl input[type=radio]:checked {
  background: var(--kyf-gruen) !important;
  border-color: var(--kyf-gruen) !important;
  box-shadow: inset 0 0 0 3.5px #fff !important;
}
.fluentform .ky-wahl .ff-el-form-check-label:has(input:checked) {
  border-color: var(--kyf-gruen);
  box-shadow: inset 0 0 0 1px var(--kyf-gruen);
  background: #FFFDF8;
}
.fluentform .ky-wahl .ff-el-form-check-label:has(input:focus-visible) { outline: 2px solid var(--kyf-gruen); outline-offset: 2px; }
.fluentform .ky-wahl .ff-el-help-message { grid-column: 1 / -1; margin-top: 0; }

/* ------------------------------------------- Bestätigungen, ohne jeden Kasten */
.fluentform .ff-el-form-check.ff-el-tc {
  display: block !important;
  width: 100%;
  margin: 0 !important;
  padding: 0;
  background: none !important;
  border: 0 !important;
  border-radius: 0;
}
.fluentform .ky-f-erster-haken {
  padding-top: 20px !important;
  margin-top: 8px !important;
  border-top: 1px solid var(--kyf-trenner) !important;
}
.fluentform form > fieldset > .ky-f-haken + .ky-f-haken { margin-top: -6px !important; }
.fluentform .ff-el-form-check-label.ff_tc_label {
  display: flex !important;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
  cursor: pointer;
}
.fluentform .ff_tc_checkbox { display: block !important; flex: 0 0 20px; width: 20px; height: 20px; margin: 1px 0 0; padding: 0 !important; line-height: 0; }
body .fluentform .ff-el-form-check.ff-el-tc label.ff-el-form-check-label.ff_tc_label .ff_tc_checkbox { padding: 0 !important; }
.fluentform .ff_t_c { display: block !important; flex: 1 1 auto; min-width: 0; padding: 0 !important; }
.fluentform .ff_t_c,
.fluentform .ff_tc_label,
.fluentform .ff_tc_label .ff_t_c p {
  margin: 0;
  font-family: var(--kyf-sans) !important;
  font-size: 15px !important;
  font-weight: 400;
  line-height: 1.5 !important;
  color: var(--kyf-tinte) !important;
}
.fluentform .ff_t_c a,
.fluentform .ff-el-form-check-label a {
  color: var(--kyf-gruen) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-color: rgba(17, 55, 11, .4) !important;
}
.fluentform .ff_t_c a:hover,
.fluentform .ff_t_c a:focus,
.fluentform .ff-el-form-check-label a:hover,
.fluentform .ff-el-form-check-label a:focus {
  color: var(--kyf-gold) !important;
  text-decoration-color: var(--kyf-gold) !important;
}
.fluentform .ff_tc_label input[type=checkbox],
.fluentform .ff-el-group input[type=checkbox] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block;
  position: static !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff no-repeat center / 13px 10px !important;
  border: 1.5px solid rgba(31, 42, 27, .45) !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  cursor: pointer;
}
.fluentform .ff_tc_label input[type=checkbox]::before, .fluentform .ff_tc_label input[type=checkbox]::after,
.fluentform .ff-el-group input[type=checkbox]::before, .fluentform .ff-el-group input[type=checkbox]::after { content: none !important; display: none !important; }
.fluentform .ff_tc_label input[type=checkbox]:checked,
.fluentform .ff-el-group input[type=checkbox]:checked {
  background-color: var(--kyf-gruen) !important;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10' viewBox='0 0 13 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M1 5l3.8 3.6L12 1.2'/%3E%3C/svg%3E") !important;
  border-color: var(--kyf-gruen) !important;
}
.fluentform .ff-el-group input[type=checkbox]:focus-visible { outline: 2px solid var(--kyf-gruen); outline-offset: 2px; }

/* --------------------------------------------------------------- Absenden */
/* Farbe und Form kommen aus fuss-2026.css, hier nur Maß und Ladezustand */
.fluentform .ff_submit_btn_wrapper { margin-top: 2px; }
.fluentform .ff-btn-submit,
.fluentform .ff_submit_btn_wrapper .ff-btn-submit:not(.ff_btn_no_style) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 28px !important;
  background-image: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .25s ease, border-color .25s ease;
}
.fluentform .ff-btn-submit:focus-visible { outline: 2px solid var(--kyf-gruen) !important; outline-offset: 2px; }
.fluentform .ff-btn-submit:disabled,
.fluentform .ff-btn-submit.ff_working { opacity: .55; cursor: progress; }

/* -------------------------------------------------------- Fehler und Erfolg */
.fluentform .error,
.fluentform .error-text,
.fluentform .ff-el-is-error .error {
  margin-top: 6px;
  font-family: var(--kyf-sans) !important;
  font-size: 13.5px !important;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  color: var(--kyf-rot) !important;
}
.fluentform .ff-el-group.ff-el-is-error .ff-el-form-control,
.fluentform .ff-el-is-error .ff-el-form-control,
.fluentform .ky-wahl.ff-el-is-error .ff-el-form-check-label {
  border-color: var(--kyf-rot) !important;
  transition: none !important;
}
.fluentform .ff-errors-in-stack {
  margin-top: 14px;
  padding: 0;
  background: none;
  border: 0;
  font-family: var(--kyf-sans);
  font-size: 14.5px;
  color: var(--kyf-rot);
}
.fluentform .ff-message-success,
.ff-message-success {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  font-family: 'Kyrburg Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: #1F2A1B;
}
.ff-message-success p { margin: 0 0 .7em; }
.ff-message-success p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- Popups */
/* Nur die Formular-Popups: gleicher Grundton wie die Seite, weiche Ecken, keine Goldkante */
.kyp-modal[data-kyp-form-id] .kyp-modal__panel,
#ktf-modal-res .ktf-modal__panel {
  background: #F3EDE1;
  border-top: 0;
  border-radius: 12px;
}
.kyp-modal[data-kyp-form-id] .kyp-modal__close,
#ktf-modal-res .ktf-modal__close { background: transparent; }
.kyp-modal[data-kyp-form-id] .kyp-modal__label,
#ktf-modal-res .ktf-modal__label { display: none; }
.kyp-modal[data-kyp-form-id] .kyp-modal__title,
#ktf-modal-res .ktf-modal__title { color: #11370B; }
/* Der gewählte Termin steht als schlichte Zeile unter dem Titel, ohne Rahmen */
.kyp-modal[data-kyp-form-id] .kyp-form-event,
#ktf-modal-res .ktf-res-event {
  margin-top: 8px;
  padding: 0;
  background: none;
  border: 0;
  font-family: 'Kyrburg Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  color: #1F2A1B;
}
.kyp-modal .kyp-form-body,
.ktf-modal .ktf-res-form { margin-top: 26px; }
.kyp-modal .fluentform .ff-btn-submit,
.ktf-modal .fluentform .ff-btn-submit { width: 100%; }

/* --------------------------------------------------------------- Kalender */
.flatpickr-calendar { font-family: 'Kyrburg Jost', 'Helvetica Neue', Arial, sans-serif; border-radius: 10px; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.endRange { background: #11370B !important; border-color: #11370B !important; color: #F3EDE1 !important; }
.flatpickr-day.today { border-color: #8A5F25; }

/* ---------------------------------------------------------------- Handy */
@media (max-width: 640px) {
  .fluentform form > fieldset { gap: 16px 12px; }
  .fluentform .ff-el-group.ky-halb { grid-column: 1 / -1; }
  .fluentform .ff-el-group.ky-drittel { grid-column: span 3; }
  .fluentform .ky-drittel + .ky-drittel + .ky-drittel { grid-column: 1 / -1 !important; }
  .fluentform .ff-t-cell { flex: 1 1 100%; }
  .fluentform .ky-wahl .ff-el-input--content { grid-template-columns: minmax(0, 1fr); }
  .fluentform .ky-wahl .ff-el-form-check-label { min-height: 50px; }
  .fluentform .ff-btn-submit { width: 100%; }
  .kyp-modal[data-kyp-form-id] .kyp-modal__panel,
  #ktf-modal-res .ktf-modal__panel { border-radius: 14px 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fluentform .ff-el-form-control,
  .fluentform .ff-btn-submit,
  .fluentform .ky-wahl .ff-el-form-check-label { transition: none; }
}
