/* ==========================================================================
   Booking page (/randevu/, /en/booking/, /de/termin/) — intake form + Calendly.
   Tokens only (see style.css); package tones come from .tone-* in style.css.
   ========================================================================== */

/* ---------- Hero facts ---------- */
.bk-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.bk-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
}
.bk-facts .icon { color: var(--accent-ink); width: 18px; height: 18px; }

/* ---------- Layout ---------- */
.bk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.bk-main, .bk-form { min-width: 0; }
.bk-aside { display: grid; gap: 16px; }
@media (min-width: 961px) and (min-height: 760px) {
  .bk-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

.bk-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(20px, 3.4vw, 36px);
  box-shadow: var(--shadow);
}

/* ---------- Progress ---------- */
.bk-progress {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}
.bk-progress li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-3);
  font-size: .93rem;
  font-weight: 600;
  line-height: 1.3;
}
.bk-progress-num {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: .88rem;
  font-weight: 700;
}
.bk-progress-num .icon { width: 16px; height: 16px; }
.bk-progress li.is-current { color: var(--ink); border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.bk-progress li.is-current .bk-progress-num { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.bk-progress li.is-done { color: var(--ink-2); }
.bk-progress li.is-done .bk-progress-num { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

/* ---------- Form ---------- */
.bk-form-head { margin-bottom: 22px; }
.bk-form-head h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-bottom: 8px; }
.bk-form-head p { margin: 0; color: var(--ink-2); }

.bk-group { margin: 0; padding: 26px 0 8px; border: 0; border-top: 1px dashed var(--line-2); min-width: 0; }
/* float + clear keeps the legend inside the fieldset box, below the dashed separator */
.bk-group-title {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -.01em;
}
.bk-step-num {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 700;
}
.bk-group-title + * { clear: both; }
.bk-group-hint { margin: -6px 0 14px; }
.bk-hint { margin: 6px 0 0; font-size: .86rem; color: var(--ink-3); line-height: 1.5; }
.bk-req { color: var(--red); }
.bk-form .field label, .bk-choice legend { color: var(--ink-2); }
.bk-form .field textarea { min-height: 110px; }

/* Package picker */
.bk-packages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bk-package {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "icon name check" "icon price check";
  align-items: center;
  column-gap: 12px;
  padding: 14px 14px 14px 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--tone-bg, var(--bg));
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.bk-package input { position: absolute; opacity: 0; pointer-events: none; }
.bk-package-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--tone-soft, var(--bg-soft));
  color: var(--tone-ink, var(--ink-2));
}
.bk-package-icon .icon { width: 20px; height: 20px; }
.bk-package-name { grid-area: name; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.bk-package-none .bk-package-name { grid-row: 1 / span 2; }
.bk-package-price { grid-area: price; font-family: var(--serif); font-size: 1.05rem; color: var(--tone-ink, var(--ink-2)); }
.bk-package-check {
  grid-area: check;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  color: transparent;
  background: var(--bg-elev);
}
.bk-package-check .icon { width: 14px; height: 14px; }
.bk-package:hover { border-color: var(--tone, var(--line-2)); }
.bk-package:has(input:checked) { border-color: var(--tone, var(--primary)); box-shadow: 0 0 0 1px var(--tone, var(--primary)) inset; }
.bk-package:has(input:checked) .bk-package-check { background: var(--tone, var(--primary)); border-color: var(--tone, var(--primary)); color: var(--on-tone, var(--on-primary)); }
.bk-package:has(input:focus-visible) { outline: 2.5px solid var(--focus); outline-offset: 3px; }

/* Choice pills */
.bk-choice { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.bk-choice legend { display: block; margin-bottom: 8px; padding: 0; font-size: .88rem; font-weight: 600; }
.bk-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bk-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-pill { position: relative; cursor: pointer; }
.bk-pill input { position: absolute; opacity: 0; pointer-events: none; }
.bk-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--field-line);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.bk-pill:hover span { border-color: var(--ink-2); }
.bk-pill input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.bk-pill input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }

/* Free-text “Other” option: pill + its own text box (Google Forms style); wraps to a full row when space is short. */
.bk-other { display: flex; flex: 1 1 240px; align-items: center; gap: 8px; min-width: 0; }
.bk-other .bk-pill { flex: none; }
.bk-other-input {
  flex: 1 1 140px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 16px;
  border: 1.5px solid var(--field-line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bk-other-input::placeholder { color: var(--ink-3); }
.bk-other-input:hover { border-color: var(--ink-2); }
.bk-other-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.bk-other:has(input[type="radio"]:checked) .bk-other-input:not([aria-invalid="true"]),
.bk-other.is-active .bk-other-input:not([aria-invalid="true"]) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.bk-form .bk-other-input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }

/* Errors */
.bk-alert {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--red) 50%, transparent);
  background: color-mix(in srgb, var(--red) 9%, var(--bg-elev));
  color: var(--ink);
}
.bk-alert:focus { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.bk-alert p { margin: 0 0 6px; }
.bk-alert ul { list-style: disc; padding-left: 1.2em; }
.bk-alert li + li { margin-top: 4px; }
.bk-alert a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.bk-error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 8px 0 0;
  color: var(--red);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.45;
}
.bk-error .icon { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.bk-form [aria-invalid="true"] { border-color: var(--red); }

/* Consent + submit */
.bk-submit { padding-top: 22px; border-top: 1px dashed var(--line-2); }
.bk-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.bk-consent input {
  width: 22px; height: 22px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--primary);
  cursor: pointer;
}
.bk-consent label { font-size: .93rem; color: var(--ink-2); line-height: 1.5; cursor: pointer; }
.bk-consent a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bk-submit > .bk-error { margin-bottom: 4px; }
.bk-submit .btn { margin-top: 18px; white-space: normal; text-align: center; }
.bk-submit .btn[aria-disabled="true"] { opacity: .7; cursor: progress; transform: none; }
.bk-form .form-note { display: flex; justify-content: center; align-items: center; gap: 6px; }
.bk-form .form-note .icon { width: 14px; height: 14px; flex: none; }

/* Honeypot: off-screen, never visible */
.bk-hp {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Calendar step ---------- */
.bk-cal-head h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); margin-bottom: 8px; }
.bk-cal-head > p { margin: 0; color: var(--ink-2); }
.bk-cal-pkg {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 12px 16px 12px 12px;
  border-radius: 16px;
  background: var(--tone-bg);
  border: 1px solid var(--tone-soft);
}
.bk-cal-pkg-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--tone-soft);
  color: var(--tone-ink);
}
.bk-cal-pkg-icon .icon { width: 20px; height: 20px; }
.bk-cal-pkg small { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bk-cal-pkg strong { display: block; line-height: 1.3; }
.bk-cal-pkg-price { margin-left: auto; font-family: var(--serif); font-size: 1.3rem; color: var(--tone-ink); }

.bk-cal-frame {
  position: relative;
  margin: 22px calc(clamp(20px, 3.4vw, 36px) * -1) 0;
  border-block: 1px solid var(--line);
  background: #FFFFFF;
}
.calendly-inline-widget { position: relative; z-index: 1; min-width: 300px; height: 720px; }
.bk-cal-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #5F6573;
  font-weight: 600;
}
.bk-cal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin: 18px 0 0;
  font-size: .93rem;
  color: var(--ink-3);
}
.bk-cal-links .text-link { display: inline-flex; align-items: center; gap: 6px; }
.bk-cal-links .icon { width: 16px; height: 16px; }

.bk-cal-done {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--ok-soft);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}
.bk-cal-done[hidden] { display: none; }
.bk-cal-done-icon { color: var(--ok); }
.bk-cal-done-icon .icon { width: 28px; height: 28px; }
.bk-cal-done h3 { font-size: 1.1rem; margin-bottom: 4px; }
.bk-cal-done p { margin: 0; color: var(--ink-2); }

/* ---------- Aside ---------- */
.bk-aside-card {
  padding: 24px;
  border-radius: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.bk-aside-title { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 16px; }
.bk-aside-steps { display: grid; gap: 16px; }
.bk-aside-steps li { display: flex; gap: 14px; }
.bk-aside-num {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .9rem;
}
.bk-aside-steps strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.bk-aside-steps p { margin: 0; font-size: .93rem; color: var(--ink-2); line-height: 1.5; }

.bk-help { background: var(--panel-bg); color: var(--panel-ink); border-color: var(--panel-line); }
.bk-help .bk-aside-title { margin-bottom: 8px; }
.bk-help p { color: var(--panel-ink-2); font-size: .95rem; margin-bottom: 18px; }
.bk-help :focus-visible { outline-color: var(--accent); }
.bk-help .btn { white-space: normal; text-align: center; }
.bk-help-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 600;
  color: var(--panel-ink);
  overflow-wrap: anywhere;
}
.bk-help-mail:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .bk-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .bk-layout { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-inline: auto; }
  .bk-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 640px) {
  .bk-card { border-radius: 20px; padding: 22px 16px; }
  .bk-cal-frame { margin-inline: -16px; }
  .calendly-inline-widget { height: 1000px; }
  .bk-aside { grid-template-columns: 1fr; }
  .bk-packages, .bk-choice-row { grid-template-columns: 1fr; gap: 10px; }
  .bk-choice-row { gap: 0; }
  .bk-progress li { padding: 10px; font-size: .86rem; gap: 8px; }
  .bk-facts li { font-size: .86rem; padding: 7px 12px; }
  .bk-cal-pkg { flex-wrap: wrap; }
}
