/* ================================================================
   APT Booking – STRATO Theme (clean)
   Gilt für Booking-Widget UND Manage-Seite
   ================================================================ */

/* =========================
   [BLOCK] CORE / TOKENS
   ========================= */
#apt-booking-widget,
#apt-manage{
  --apt-gap:10px;
  --apt-radius:14px;
  --apt-border:#e6e8f5;
  --apt-muted:#6b7184;
  --apt-bg:#f5f6fb;
  --apt-navy:#272b6a;
  --apt-focus:#3b59f6;
  --apt-success:#0a9b6a;
  --apt-error:#b00020;

  /* CTA: kräftiges Orange */
  --cta-bg:#ff5722;
  --cta-bg-hover:#f4511e;
  --cta-bg-active:#e64a19;
  --cta-shadow:0 12px 30px rgba(255,87,34,.38);

  /* Fallback: Verlauf = einfarbiges Orange */
  --cta-from:var(--cta-bg);
  --cta-to:var(--cta-bg);

  /* Inputs */
  --ctl-h:46px;
  --ctl-pad-x:14px;
  --ctl-radius:12px;
  --ctl-border:#d7dbf1;
  --ctl-bg:#ffffff;

  /* Scroll-Anchor für Rail-Positionierung (JS liest diese Var) */
  --apt-rail-anchor:150px;

  color:#1e2333;
  font-size:15px;
  line-height:1.5;

  background:transparent;
  border:none;
  border-radius:0;
  padding:0;
  max-width:100%;
  box-shadow:none;
  -webkit-tap-highlight-color: transparent;
}

/* Kartenrahmen nur für Manage-Ansicht */
#apt-manage{
  background:var(--apt-bg);
  border:1px solid var(--apt-border);
  border-radius:16px;
  padding:18px;
  box-shadow:0 1px 0 rgba(30,35,51,.02);
}

#apt-booking-widget.apt-narrow,
#apt-manage.apt-narrow{
  max-width:560px;
  margin:0 auto;
}

#apt-booking-widget *,
#apt-manage *{
  box-sizing:border-box;
}

/* =========================
   [BLOCK] SECTION LAYOUT
   ========================= */
#apt-booking-widget .apt-section,
#apt-manage .apt-section{
  padding:14px 0 18px;
  border-top:1px solid var(--apt-border);
}
#apt-booking-widget .apt-section:first-of-type,
#apt-manage .apt-section:first-of-type{
  border-top:0;
}

/* =========================
   [BLOCK] HEADINGS / STEP TITLES
   ========================= */
#apt-booking-widget .apt-section>h3,
#apt-booking-widget .apt-stephead>h3{
  position:relative;
  margin:0 0 10px;
  padding-left:36px;
  font-size:1.00rem;
  font-weight:600;
  letter-spacing:.2px;
  color:var(--apt-navy);
}
#apt-booking-widget .apt-section[data-step]>h3:before,
#apt-booking-widget .apt-section>h3[data-step]:before,
#apt-booking-widget .apt-section[data-step] .apt-stephead>h3:before,
#apt-booking-widget .apt-stephead>h3[data-step]:before{
  content:attr(data-step);
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#eef2ff;
  color:#2c44d6;
  border:1px solid #d9e1ff;
  font-weight:800;
  font-size:.78rem;
}

/* Standard Step-Header */
#apt-booking-widget .apt-stephead{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}
#apt-booking-widget .apt-step-book .apt-stephead{
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

/* =========================
   [BLOCK] ROWS & LABELS
   ========================= */
#apt-booking-widget .apt-row,
#apt-manage .apt-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--apt-gap);
  margin:8px 0;
}

#apt-booking-widget label,
#apt-manage label{
  display:block;
  text-align:left;
  font-weight:700;
  color:#3a4060;
  margin:0 0 6px;
}

/* =========================
   [BLOCK] FORM CONTROLS
   ========================= */
#apt-booking-widget input[type="text"],
#apt-booking-widget input[type="email"],
#apt-booking-widget input[type="tel"],
#apt-booking-widget input[type="number"],
#apt-booking-widget input[type="month"],
#apt-booking-widget select,
#apt-booking-widget textarea,
#apt-manage input[type="text"],
#apt-manage input[type="email"],
#apt-manage input[type="tel"],
#apt-manage input[type="number"],
#apt-manage input[type="month"],
#apt-manage select,
#apt-manage textarea{
  width:100%;
  height:var(--ctl-h);
  padding:0 var(--ctl-pad-x);
  border:1.4px solid var(--ctl-border);
  border-radius:var(--ctl-radius);
  background:var(--ctl-bg);
  font:inherit;
  color:inherit;
  min-width:0;
  box-shadow:0 1px 0 rgba(23,36,83,.02) inset;
  -webkit-appearance:none;
  appearance:none;
}
#apt-booking-widget textarea,
#apt-manage textarea{
  padding:12px var(--ctl-pad-x);
  min-height:112px;
  resize:vertical;
  height:auto;
}
#apt-booking-widget input::placeholder,
#apt-booking-widget textarea::placeholder,
#apt-manage input::placeholder,
#apt-manage textarea::placeholder{
  color:#9aa3b2;
}

#apt-booking-widget input:focus-visible,
#apt-booking-widget select:focus-visible,
#apt-booking-widget textarea:focus-visible,
#apt-manage input:focus-visible,
#apt-manage select:focus-visible,
#apt-manage textarea:focus-visible{
  outline:0;
  border-color:#bfc7fb;
  box-shadow:0 0 0 3px rgba(59,89,246,.18);
}
#apt-booking-widget input:disabled,
#apt-booking-widget select:disabled,
#apt-booking-widget textarea:disabled,
#apt-manage input:disabled,
#apt-manage select:disabled,
#apt-manage textarea:disabled{
  background:#f3f5fd;
  cursor:not-allowed;
}

/* Helpers */
#apt-booking-widget .apt-field--full{
  grid-column:1 / -1;
}

#apt-booking-widget .apt-input-addon{
  position:relative;
  display:flex;
  align-items:center;
}
#apt-booking-widget .apt-input-addon input{
  width:100%;
  padding-right:46px;
}
#apt-booking-widget .apt-input-addon .addon{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  font-weight:800;
  color:var(--apt-navy);
}

/* =========================
   [BLOCK] BUTTONS (Basis)
   ========================= */
#apt-booking-widget .apt-btn,
#apt-manage .apt-btn{
  height:var(--ctl-h);
  padding:0 18px;
  border:1px solid #ced2e8;
  background:#fff;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
  color:#20253a;
  transition:
    transform .04s ease,
    box-shadow .12s ease,
    filter .12s ease,
    border-color .12s ease,
    background-color .12s ease,
    color .12s ease;
}
#apt-booking-widget .apt-btn:hover,
#apt-manage .apt-btn:hover{
  box-shadow:0 1px 0 rgba(0,0,0,.06);
  border-color:#cfd4f4;
}
#apt-booking-widget .apt-btn:active,
#apt-manage .apt-btn:active{
  transform:translateY(1px);
}
#apt-booking-widget .apt-btn:disabled,
#apt-manage .apt-btn:disabled{
  opacity:1;
  cursor:not-allowed;
}
#apt-booking-widget .apt-btn:focus-visible,
#apt-manage .apt-btn:focus-visible{
  outline:0;
  box-shadow:0 0 0 3px rgba(59,89,246,.18);
}

/* Ghost */
#apt-booking-widget .apt-btn--ghost,
#apt-manage .apt-btn--ghost{
  background:#fff;
  border:1px solid #d6daf0;
  color:var(--apt-navy);
  box-shadow:0 1px 2px rgba(21,29,66,.03);
}

/* Link-Button */
#apt-booking-widget .apt-btn--link,
#apt-manage .apt-btn--link{
  background:none;
  border:0;
  padding:0;
  color:#0a58ca;
  text-decoration:underline;
  font-weight:800;
  cursor:pointer;
  height:auto;
}

/* Danger */
#apt-booking-widget .apt-btn--danger,
#apt-manage .apt-btn--danger{
  border-color:#c62828;
  color:#c62828;
}
#apt-booking-widget .apt-btn--danger:hover,
#apt-manage .apt-btn--danger:hover{
  background:#c6282812;
}

/* =========================
   [BLOCK] CTA – EINHEITLICHER ORANGE-BUTTON
   ========================= */
#apt-booking-widget .apt-btn--cta,
#apt-manage .apt-btn--cta{
  border:0;
  color:#ffffff;
  background:var(--cta-bg);
  box-shadow:var(--cta-shadow);
}
#apt-booking-widget .apt-btn--cta:hover,
#apt-manage .apt-btn--cta:hover{
  background:var(--cta-bg-hover);
  box-shadow:0 10px 28px rgba(255,87,34,.40);
}
#apt-booking-widget .apt-btn--cta:active,
#apt-manage .apt-btn--cta:active{
  background:var(--cta-bg-active);
  transform:translateY(1px);
  box-shadow:0 6px 18px rgba(255,87,34,.35);
}
#apt-booking-widget .apt-btn--cta:disabled,
#apt-manage .apt-btn--cta:disabled{
  background:#dde2ec;
  color:#8b93a5;
  box-shadow:none;
}

/* CTA anwenden (Widget: Suchen & Buchen) */
#apt-booking-widget #apt-book-now{
  min-width:240px;
}
#apt-booking-widget #apt-book-now,
#apt-booking-widget .apt-input-inline #apt-find-locations{
  border:0;
  color:#ffffff;
  background:var(--cta-bg);
  box-shadow:var(--cta-shadow);
}

/* =========================
   [BLOCK] INLINE INPUTS (PLZ + Button)
   ========================= */
#apt-booking-widget .apt-input-inline{
  position:relative;
  width:100%;
}

/* Step-1: zentrierter „Search-Pill“-Block */
#apt-step-1 .apt-input-inline{
  max-width:540px;
  margin:18px auto 0;
}

/* PLZ-Feld als Pill mit Shadow */
#apt-booking-widget .apt-input-inline #apt-plz{
  padding-right:120px;
  height:52px;
  border-radius:999px;
  border:none;
  background:#ffffff;
  box-shadow:0 12px 30px rgba(0, 82, 171, 0.18);
  font-size:16px;
}

/* Platzhalterfarbe leicht grau */
#apt-booking-widget .apt-input-inline #apt-plz::placeholder{
  color:#9aa4bf;
}

/* Fokuszustand für PLZ */
#apt-booking-widget .apt-input-inline #apt-plz:focus-visible{
  outline:0;
  border:none;
  box-shadow:0 16px 36px rgba(0, 82, 171, 0.24);
}

/* „SUCHEN“-Button im Pill */
#apt-booking-widget .apt-input-inline #apt-find-locations{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  height:44px;
  padding:0 24px;
  border-radius:999px;
  z-index:1;
  font-size:14px;
  font-weight:600;
}

/* Hover / Active */
#apt-booking-widget .apt-input-inline #apt-find-locations:hover{
  filter:brightness(.98);
}
#apt-booking-widget .apt-input-inline #apt-find-locations:active{
  transform:translateY(-50%) scale(.99);
}

/* Deaktiviert (grau) */
#apt-booking-widget .apt-input-inline #apt-find-locations:disabled{
  background:#dde2ec;
  color:#8b93a5;
  box-shadow:none;
  opacity:1;
  filter:none;
  cursor:not-allowed;
}

/* =========================
   PLZ-Icon statt Textlabel
   ========================= */
#apt-booking-widget label[for="apt-plz"]{
  position: relative;
  width: 46px;
  height: 46px;
  margin: 0 14px 0 0;
  border-radius: 999px;
  background: #f4f9ff;
  box-shadow: 0 8px 24px rgba(47,137,214,.18);
  text-indent: -9999px;
  overflow: hidden;
  display: inline-block;
}
#apt-booking-widget label[for="apt-plz"]::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5.5 10.8L18 5.5l-5.3 12.5-1.4-4.7-5.8-2.5z' fill='%2372b4ec'/%3E%3C/svg%3E")
    center center no-repeat;
  background-size: 22px 22px;
}
#apt-booking-widget .apt-step-plz .apt-row{
  align-items: center;
}

/* =========================
   [BLOCK] LOCATION CARDS
   ========================= */
#apt-booking-widget .apt-list,
#apt-booking-widget #apt-locations-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
#apt-booking-widget .apt-card{
  position:relative;
  cursor:pointer;
  border:1px solid var(--apt-border);
  border-radius:14px;
  background:#fff;
  padding:12px 14px 12px 44px;
  transition:border-color .15s, box-shadow .15s;
  outline:none;
}
#apt-booking-widget .apt-card:before{
  content:'';
  position:absolute;
  left:14px;
  top:14px;
  width:14px;
  height:14px;
  border-radius:50%;
  border:2px solid #c1c7ef;
  background:#fff;
}
#apt-booking-widget .apt-card:hover,
#apt-booking-widget .apt-card:focus-visible{
  border-color:#3b59f6;
  box-shadow:0 0 0 3px rgba(59,89,246,.18), 0 1px 6px rgba(21,29,66,.05);
}
#apt-booking-widget .apt-card.selected{
  border-color:#3b59f6;
  box-shadow:0 0 0 3px rgba(59,89,246,.18), 0 2px 10px rgba(59,89,246,.12);
}
#apt-booking-widget .apt-card.selected:before{
  border-color:#3b59f6;
  box-shadow:inset 0 0 0 5px #3b59f6;
}
#apt-booking-widget .apt-card.apt-card--muted{
  opacity:.6;
  cursor:not-allowed;
  filter:grayscale(.08);
}
#apt-booking-widget .apt-title{
  font-weight:800;
  color:#2a2f63;
  display:flex;
  align-items:center;
  gap:6px;
}

/* Empfehlungs-Badge rechts */
#apt-booking-widget .apt-title .apt-badge:not(.apt-badge--muted){
  margin-left:auto;
  font-size:.70rem;
  padding:2px 10px;
  color:var(--apt-success);
}

/* Muted-Badge links am Namen */
#apt-booking-widget .apt-title .apt-badge--muted{
  margin-left:8px;
}

/* =========================
   [BLOCK] LOCATION SUBTEXT / DISTANCE
   ========================= */
#apt-booking-widget .apt-sub{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  color:var(--apt-muted);
  font-size:.88rem;
  margin-top:2px;
}
#apt-booking-widget .apt-dist{
  margin-left:0;
  font-size:.80rem;
  color:var(--apt-muted);
}

/* Badges */
#apt-booking-widget .apt-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  font-size:.73rem;
  font-weight:800;
  border:1px solid #e2e6ff;
  background:#eef2ff;
  color:#2a43d9;
}
#apt-booking-widget .apt-badge--muted{
  border-color:#eee;
  background:#f5f6fb;
  color:#6b7184;
}

/* =========================
   [BLOCK] INFO + FAQ
   ========================= */
#apt-booking-widget .apt-info{
  margin-bottom:10px;
}
#apt-booking-widget .apt-info-box{
  display:flex;
  gap:8px;
  align-items:flex-start;
  padding:12px 14px;
  border-radius:12px;
  background:#eef2ff;
  border:1px solid #dbe3ff;
}
#apt-booking-widget .apt-info-title{
  font-weight:800;
  margin:0 0 2px;
  font-size:.9rem;
  color:#2a2f63;
}
#apt-booking-widget .apt-info-desc{
  margin:0;
  color:#2e3559;
  font-size:.78rem;
}
#apt-booking-widget .apt-i{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  border:1px solid #9fb3ff;
  color:#3e57e0;
  font-weight:800;
  font-size:11px;
  background:#fff;
}

/* FAQ */
#apt-booking-widget .apt-accordion{
  margin-top:8px;
}
#apt-booking-widget .apt-acc-item{
  border-bottom:1px solid #eef1fb;
}
#apt-booking-widget .apt-acc-toggle{
  background:none;
  border:0;
  width:100%;
  text-align:left;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 0;
  color:#2a2f63;
  font-weight:700;
  min-height:40px;
}
#apt-booking-widget .apt-acc-toggle:hover{
  text-decoration:underline;
}
#apt-booking-widget .apt-acc-toggle[aria-expanded="true"]{
  color:#2b44e0;
}
#apt-booking-widget .apt-acc-panel{
  padding:6px 0 12px 26px;
  color:#2e3559;
  font-size:.85rem;
}

/* FAQ Sichtbarkeit */
#apt-booking-widget #apt-faq[hidden]{
  display:none !important;
}

/* Info-Box in Step 2/Slots */
#apt-booking-widget .apt-step-plz .apt-step-slots .apt-info{
  margin:16px 0 12px;
}

/* =========================
   [BLOCK] TAG / UHRZEIT
   ========================= */
#apt-booking-widget .apt-row-selects,
#apt-manage .apt-row-selects{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  align-items:end;
}
#apt-booking-widget .apt-select,
#apt-manage .apt-select{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
#apt-booking-widget .apt-select label,
#apt-manage .apt-select label{
  font-weight:800;
  font-size:.95rem;
  color:#2a2f63;
}
#apt-booking-widget select,
#apt-manage select{
  padding-right:40px;
  background:
    var(--ctl-bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")
    no-repeat right 12px center;
  background-size:18px 18px;
}
#apt-booking-widget select:disabled,
#apt-manage select:disabled{
  background-color:#f3f5fd;
  cursor:not-allowed;
}

/* Erstzulassung – Monat/Jahr (Widget) */
#apt-booking-widget .apt-firstreg-inline{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  align-items:end;
}
#apt-booking-widget #apt-firstreg{
  display:none;
}

/* =========================
   [BLOCK] STANDARD-FORM-LAYOUT
   ========================= */
#apt-booking-widget .apt-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 16px;
  align-items:start;
}
#apt-booking-widget .apt-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  border:1px solid transparent;
  border-radius:12px;
  padding:10px 12px;
  background:transparent;
}
#apt-booking-widget .apt-actions{
  grid-column:1 / -1;
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}

/* =========================
   [BLOCK] STEP 2 – Fahrzeugdaten EINSPALTIG
   ========================= */
#apt-step-2 .apt-form{
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
  align-items:stretch !important;
}
#apt-step-2 .apt-field{
  width:100% !important;
}
#apt-step-2 .apt-firstreg-inline{
  display:flex !important;
  gap:8px;
}
#apt-step-2 .apt-firstreg-inline .apt-select{
  flex:1 1 50%;
  min-width:0;
}
@media (max-width:380px){
  #apt-step-2 .apt-firstreg-inline{
    flex-direction:column;
  }
}

/* STEP 2 – Navigation (PLZ ändern oben) */
#apt-step2-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin:6px 0 36px;
}
#apt-step2-actions .apt-btn{
  height:30px;
  padding:0 14px;
  border-radius:999px;
  font-size:0.82rem;
  font-weight:700;
  line-height:1;
  box-shadow:0 3px 10px rgba(39,43,106,.06);
}

/* STEP 2 – Actions-Container & Weiter-Button rechtsbündig */
#apt-step-2 .apt-actions{
  width:100%;
}
#apt-step-2 #apt-go-step3{
  display:block;
  width:auto;
  margin-left:auto;
}

/* =========================
   [BLOCK] STEP 3 – Slots/Standort
   ========================= */
#apt-step-3 .apt-form{
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
}
#apt-step-3 .apt-field{
  width:100% !important;
}
#apt-step-3 .apt-firstreg-inline{
  display:flex !important;
  gap:8px;
}
#apt-step-3 .apt-firstreg-inline .apt-select{
  flex:1 1 50%;
  min-width:0;
}
@media (max-width:380px){
  #apt-step-3 .apt-firstreg-inline{
    flex-direction:column;
  }
}

/* STEP 3 HEADER: Buttons links/rechts, Titel darunter */
#apt-step-3 .apt-stephead{
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-areas:
    "back plz"
    "title title";
  column-gap:10px;
  row-gap:32px;
  align-items:center;
  margin-bottom:22px;
}

/* Grid-Zuordnung */
#apt-step-3 .apt-stephead h3{
  grid-area:title;
  text-align:center;
  width:100%;
}
#apt-step-3 .apt-stephead #apt-back-step2{
  grid-area:back;
  justify-self:flex-start;
}
#apt-step-3 .apt-stephead #apt-reopen-step1,
#apt-step-3 .apt-stephead #apt-reopen-step1-2{
  grid-area:plz;
  justify-self:flex-end;
}

/* Buttons in Step 3 – kompakt & modern */
#apt-back-step2,
#apt-reopen-step1,
#apt-reopen-step1-2{
  height:30px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  font-size:0.82rem !important;
  font-weight:700 !important;
  line-height:1 !important;
  border:1px solid #d6daf0 !important;
  background:#ffffff !important;
  box-shadow:0 3px 10px rgba(39,43,106,.06) !important;
  color:#2a2f63 !important;
  white-space:nowrap;
}

/* leichte Differenzierung: PLZ-Button etwas „weicher“ */
#apt-reopen-step1,
#apt-reopen-step1-2{
  background:#f7f8ff !important;
  border-color:#ccd4ff !important;
}

/* Mobile: Buttons dürfen brechen */
@media (max-width:480px){
  #apt-step-3 .apt-stephead{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "back back"
      "plz  plz"
      "title title";
  }
  #apt-back-step2,
  #apt-reopen-step1,
  #apt-reopen-step1-2{
    justify-self:stretch;
    text-align:center;
  }
}

/* =========================
   [BLOCK] STEP 4 (Buchen – Termin & Meine Daten kompakter)
   ========================= */
#apt-step-4 .apt-stephead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#apt-step-4 .apt-stephead .apt-change-slot{
  margin-left:auto;
}
#apt-step-4 .apt-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px 10px;
  align-items:start;
}
#apt-step-4 .apt-field{
  padding:4px 8px;
  gap:3px;
  border-radius:12px;
}
#apt-step-4 .apt-field > label{
  display:block;
  text-align:left;
  margin:0 0 2px;
  font-weight:700;
  color:#3a4060;
  font-size:.9rem;           /* kleiner & näher am Feld */
}
#apt-step-4 .apt-row{
  gap:6px;
  margin:4px 0;              /* weniger Abstand zwischen den Zeilen */
}
#apt-step-4 .apt-field--full{
  grid-column:1 / -1;
}

/* Termin-Auswahl (Neuer Tag / Uhrzeit) kompakter */
#apt-step-4 .apt-row-selects{
  gap:8px;
  margin:2px 0 4px;
}
#apt-step-4 .apt-row-selects .apt-select label{
  font-size:.88rem;
  margin-bottom:2px;
}

/* Actions in Step 4 näher an den Feldern */
#apt-step-4 .apt-actions{
  margin-top:8px;
}

@media (max-width:820px){
  #apt-step-4 .apt-form{
    grid-template-columns:1fr;
    gap:6px;
  }
}

/* =========================
   [BLOCK] MANAGE – Kartenlayout
   ========================= */
#apt-manage .apt-manage-card{
  background:#eef3ff22;
  border:1px solid var(--apt-border);
  border-radius:14px;
  padding:14px;
  margin:12px 0;
}
#apt-manage .apt-manage-card--cancel{
  background:#fff;
}
#apt-manage .apt-manage-h4{
  margin:0 0 6px;
  font-size:1rem;
  font-weight:800;
  color:#2a2f63;
}
#apt-manage .apt-manage-actions{
  margin-top:8px;
}
#apt-manage .apt-manage-divider{
  border-top:1px solid var(--apt-border);
  margin:14px 0;
}

/* =========================
   [BLOCK] DSGVO / CONSENT
   ========================= */
#apt-booking-widget .apt-consent{
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-size:.85rem;
  color:#2a2f63;
}
#apt-booking-widget .apt-consent a{
  color:#2a2f63;
  text-decoration:underline;
  font-weight:200;
}
#apt-booking-widget .apt-consent input[type="checkbox"]{
  width:22px;
  height:22px;
  min-width:22px;
  margin-top:2px;
  border-radius:4px;
  accent-color:var(--apt-focus);
}

/* =========================
   [BLOCK] STATUS TEXTS
   ========================= */
#apt-booking-widget .apt-muted,
#apt-manage .apt-muted{
  color:var(--apt-muted);
  margin:8px 0;
}
#apt-booking-widget .apt-success,
#apt-manage .apt-success{
  color:var(--apt-success);
  font-weight:800;
  margin-top:8px;
}
#apt-booking-widget .apt-error,
#apt-manage .apt-error{
  color:var(--apt-error);
  font-weight:800;
  margin-top:8px;
}

/* =========================
   [BLOCK] SUMMARY (Step 4 – Zusammenfassung)
   ========================= */
#apt-booking-widget #apt-summary{
  margin-top:10px;
}
#apt-booking-widget .apt-summary-card{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--apt-border);
  background:#ffffff;
  box-shadow:0 2px 6px rgba(15,23,42,.05);
}
#apt-booking-widget .apt-summary-icon{
  font-size:24px;
  line-height:1;
}
#apt-booking-widget .apt-summary-body{
  text-align:center;
}
#apt-booking-widget .apt-summary-title{
  font-weight:700;
  color:var(--apt-navy);
}
#apt-booking-widget .apt-summary-sub{
  font-size:.9rem;
  color:var(--apt-muted);
}
#apt-booking-widget .apt-summary-badge{
  margin-top:8px;
  text-align:center;
  font-weight:700;
  font-size:.9rem;
  color:var(--apt-success);
}

/* =========================
   [BLOCK] PENDING (E-Mail-Bestätigung)
   ========================= */
#apt-booking-widget #apt-pending{
  border-top:1px solid var(--apt-border);
  padding:16px 2px 8px;
}
#apt-booking-widget #apt-pending h2{
  margin:16px 0 8px;
  font-size:28px;
  font-weight:800;
  color:#dd6a00;
}
#apt-booking-widget #apt-pending p{
  margin:0 0 10px;
  color:#2a2f63;
}
#apt-booking-widget #apt-pending strong{
  color:#1f264d;
}
#apt-booking-widget #apt-pending #apt-pending-msg{
  min-height:20px;
}
#apt-booking-widget #apt-change-email-form input{
  height:40px;
  border-radius:10px;
}

/* =========================
   [BLOCK] CONFIRMATION VIEW
   ========================= */
#apt-booking-widget #apt-confirm{
  margin-top:16px;
  padding:18px 20px 20px;
  border-radius:16px;
  border:1px solid var(--apt-border);
  background:#ffffff;
  text-align:center;
  box-shadow:0 2px 8px rgba(15,23,42,.06);
}
#apt-booking-widget #apt-confirm h3{
  margin:0 0 10px;
  font-size:1.05rem;
  font-weight:700;
  color:#2a2f63;
}
#apt-booking-widget #apt-confirm p{
  margin:2px 0;
  color:#2a2f63;
}
#apt-booking-widget #apt-confirm .apt-btn--cta{
  min-width:220px;
}
#apt-booking-widget #apt-confirm img{
  display:block;
  margin:6px auto 6px;
}

/* =========================
   [BLOCK] RAIL / ONE-QUESTION-FLOW
   ========================= */
#apt-booking-widget .apt-rail{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
#apt-booking-widget .apt-field.is-active{
  border:1.6px solid var(--apt-focus);
  box-shadow:0 0 0 3px rgba(59,89,246,.18);
  background:#fff;
}
#apt-booking-widget .apt-field.is-done{
  background:#f7f8ff;
  border:1px solid #dfe4ff;
  box-shadow:none;
}
#apt-booking-widget .apt-field.is-hidden{
  display:none !important;
}
#apt-booking-widget .apt-field.is-active input:focus-visible,
#apt-booking-widget .apt-field.is-active select:focus-visible,
#apt-booking-widget .apt-field.is-active textarea:focus-visible{
  outline:0 !important;
  box-shadow:none !important;
  border-color:transparent !important;
}
#apt-booking-widget .apt-field.is-active input,
#apt-booking-widget .apt-field.is-active select,
#apt-booking-widget .apt-field.is-active textarea{
  border-color:transparent;
}
#apt-booking-widget .apt-field .apt-commit{
  display:none !important;
}
#apt-booking-widget .apt-field.is-done .apt-commit{
  display:none !important;
}

/* STEP 2 – erledigte Felder kompakter (Rail-Ansicht) */
#apt-step-2 .apt-field.is-done{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  padding:4px 8px 6px;
}
#apt-step-2 .apt-field.is-done > label{
  font-size:0.86rem;
  margin-bottom:2px;
  font-weight:600;
}
#apt-step-2 .apt-field.is-done .apt-commit{
  font-size:0.9rem;
  padding-top:0;
}

/* Sanfte Übergänge */
@media (prefers-reduced-motion:no-preference){
  #apt-booking-widget .apt-field,
  #apt-manage .apt-field{
    transition:
      border-color .18s ease,
      box-shadow .18s ease,
      background .18s ease;
  }
}

/* Gate/Lock */
.apt-locked{
  position:relative;
  pointer-events:none;
  opacity:.9;
  filter:grayscale(.06);
}
.apt-locked::after{
  content:attr(data-gate);
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  text-align:center;
  padding:14px;
  border-radius:14px;
  background:linear-gradient(0deg, rgba(245,246,251,.82), rgba(245,246,251,.82));
  color:#2a2f63;
  font-weight:700;
  line-height:1.35;
}

/* Slots / Hinweise */
#apt-slots-range{
  margin:6px 0 10px;
  color:var(--apt-muted);
  font-size:14px;
}
#apt-time-hint{
  margin-top:4px;              /* etwas näher an den Feldern */
  color:var(--apt-muted);
  font-size:13px;
}

/* Tastaturzugänglichkeit für Karten */
#apt-locations-list .apt-card:focus-visible{
  outline:none;
  border-color:var(--apt-focus);
  box-shadow:0 0 0 3px rgba(59,89,246,.18);
}

/* =========================
   [SMOOTHER STEP TRANSITIONS]
   ========================= */
#apt-booking-widget,
#apt-manage{
  --ease-smooth:cubic-bezier(.22,.61,.36,1);
  --dur-fast:140ms;
  --dur-med:200ms;
}
#apt-booking-widget .apt-step,
#apt-manage .apt-step{
  opacity:1;
  transform:translateY(0);
  transition:
    opacity var(--dur-med) var(--ease-smooth),
    transform var(--dur-med) var(--ease-smooth);
  will-change:opacity, transform;
}
#apt-booking-widget .apt-step.is-hidden,
#apt-manage .apt-step.is-hidden{
  opacity:0;
  transform:translateY(6px);
  pointer-events:none;
  visibility:hidden;
}
#apt-booking-widget .apt-card,
#apt-manage .apt-card{
  transition:
    border-color var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-fast) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-smooth);
}
#apt-booking-widget .apt-card:hover,
#apt-booking-widget .apt-card:focus-visible{
  box-shadow:0 0 0 3px rgba(59,89,246,.14), 0 1px 6px rgba(21,29,66,.04);
}
#apt-booking-widget .apt-input-inline #apt-find-locations{
  transition:
    filter var(--dur-fast) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-fast) var(--ease-smooth);
}
#apt-booking-widget #apt-pending,
#apt-booking-widget #apt-confirm{
  opacity:1;
  transform:translateY(0);
  transition:
    opacity var(--dur-med) var(--ease-smooth),
    transform var(--dur-med) var(--ease-smooth);
}
#apt-booking-widget #apt-pending[hidden],
#apt-booking-widget #apt-confirm[hidden]{
  display:block !important;
  opacity:0;
  transform:translateY(6px);
  pointer-events:none;
  visibility:hidden;
}
@media (prefers-reduced-motion:reduce){
  #apt-booking-widget .apt-step,
  #apt-manage .apt-step,
  #apt-booking-widget #apt-pending,
  #apt-booking-widget #apt-confirm{
    transition:none !important;
  }
}

/* =========================
   [BLOCK] RESPONSIVE
   ========================= */
@media (max-width:820px){
  #apt-booking-widget .apt-form{
    grid-template-columns:1fr;
  }
  #apt-booking-widget .apt-row-selects,
  #apt-manage .apt-row-selects{
    grid-template-columns:1fr;
  }
}
@media (max-width:520px){
  #apt-booking-widget,
  #apt-manage{
    font-size:14.5px;
  }
  #apt-booking-widget .apt-section,
  #apt-manage .apt-section{
    padding:10px 0 14px;
  }
  #apt-booking-widget .apt-section>h3,
  #apt-booking-widget .apt-stephead>h3{
    font-size:1rem;
    padding-left:32px;
  }
  #apt-booking-widget .apt-section[data-step]>h3:before,
  #apt-booking-widget .apt-section>h3[data-step]:before,
  #apt-booking-widget .apt-section[data-step] .apt-stephead>h3:before,
  #apt-booking-widget .apt-stephead>h3[data-step]:before{
    width:22px;
    height:22px;
    font-size:.74rem;
  }
  #apt-booking-widget .apt-input-inline #apt-find-locations{
    height:40px;
    padding:0 18px;
  }
}

/* =========================
   [BLOCK] DARK MODE (optional)
   ========================= */
@media (prefers-color-scheme:dark){
  #apt-booking-widget,
  #apt-manage{
    --apt-border:#2a2f3f;
    --apt-bg:#0f121a;
    --apt-muted:#a7b0c7;
    --ctl-border:#2a2f45;
    --ctl-bg:#101520;
    color:#e8ebf6;
  }

  #apt-manage{
    background:var(--apt-bg);
    border-color:var(--apt-border);
  }

  #apt-booking-widget .apt-card{
    background:#101520;
    border-color:#2a2f45;
  }
  #apt-booking-widget .apt-summary-card,
  #apt-manage .apt-summary-card{
    background:#111a2a;
    border-color:#2a3e6a;
    box-shadow:0 2px 10px rgba(15,23,42,.7);
  }
  #apt-booking-widget .apt-input-inline #apt-find-locations{
    box-shadow:0 3px 14px rgba(255,87,34,.2);
  }
  #apt-booking-widget #apt-pending h2{
    color:#ffb14a;
  }
}
