/* Online-Buchung (includes/booking-widget.php + assets/js/booking.js).
   Eingebunden auf der Startseite und auf Angebote über $extraStyles. */

.booking{background:linear-gradient(180deg, var(--ivory) 0%, var(--cream-2) 100%);position:relative}
.booking-card{background:var(--ivory);border-radius:32px;padding:3.5rem;box-shadow:var(--shadow);max-width:1100px;margin:0 auto;position:relative;overflow:hidden}
.booking-card::before{content:'';position:absolute;top:-100px;right:-100px;width:300px;height:300px;border-radius:50%;background:radial-gradient(circle, var(--rose-soft) 0%, transparent 70%);opacity:0.45}
.booking-steps{display:flex;justify-content:center;gap:0;margin-bottom:3rem;position:relative;z-index:2}
.step{display:flex;align-items:center;gap:0.8rem;color:var(--ink-soft);font-size:0.8rem;letter-spacing:0.15em;text-transform:uppercase;transition:color 0.3s}
.step.active{color:var(--ink)}
.step.done{color:var(--terracotta)}
.step-num{width:34px;height:34px;border-radius:50%;background:transparent;border:1px solid currentColor;display:flex;align-items:center;justify-content:center;font-family:'Cormorant Garamond',serif;font-size:1.1rem;font-weight:500}
.step.active .step-num,.step.done .step-num{background:currentColor}
.step.active .step-num{color:var(--ink)}
.step.done .step-num{color:var(--terracotta)}
.step.active .step-num span,.step.done .step-num span{color:var(--ivory)}
.step-divider{width:60px;height:1px;background:var(--line);margin:0 1.2rem;align-self:center;margin-top:17px}

.booking-content{position:relative;z-index:2;min-height:380px}
.booking-step-title{display:none}   /* nur auf dem Handy, siehe unten */
.booking-pane{display:none}
.booking-pane.active{display:block;animation:fadeUp 0.5s ease}

.service-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.service-option{padding:1.5rem;border:1px solid var(--line);border-radius:16px;cursor:pointer;background:transparent;font-family:inherit;text-align:left;transition:all 0.3s;color:var(--ink)}
.service-option:hover{border-color:var(--terracotta);background:rgba(190,110,71,0.04)}
.service-option.selected{border-color:var(--terracotta);background:rgba(190,110,71,0.08)}
.service-option-name{font-family:'Cormorant Garamond',serif;font-size:1.25rem;margin-bottom:0.3rem}
.service-option-meta{font-size:0.8rem;color:var(--ink-soft);display:flex;justify-content:space-between;align-items:center;margin-top:0.5rem}
.service-option-meta strong{color:var(--terracotta);font-weight:500}
.service-footnote{margin-top:1.2rem;font-size:0.8rem;color:var(--ink-soft);font-style:italic}
.service-option-note{margin-top:0.4rem;font-size:0.74rem;color:var(--ink-soft);font-style:italic}

.calendar-wrap{display:grid;grid-template-columns:1.3fr 1fr;gap:2.5rem;align-items:start}
.calendar{background:var(--cream);padding:1.8rem;border-radius:18px}
.calendar-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}
.calendar-month{font-family:'Cormorant Garamond',serif;font-size:1.5rem;font-weight:500}
.cal-nav{background:transparent;border:1px solid var(--line);width:34px;height:34px;border-radius:50%;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--ink);transition:all 0.3s;font-size:1rem}
.cal-nav:hover:not(:disabled){background:var(--ink);color:var(--cream);border-color:var(--ink)}
.cal-nav:disabled{opacity:0.3;cursor:not-allowed}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.calendar-grid.is-loading{opacity:0.45;pointer-events:none;transition:opacity 0.2s}
.day-label{text-align:center;font-size:0.7rem;letter-spacing:0.15em;text-transform:uppercase;color:var(--ink-soft);padding:0.5rem 0}
.day{aspect-ratio:1;border:none;background:transparent;cursor:pointer;border-radius:8px;font-family:inherit;font-size:0.9rem;color:var(--ink);transition:all 0.2s;position:relative}
.day:hover:not(:disabled){background:rgba(190,110,71,0.1)}
.day.selected{background:var(--ink);color:var(--cream)}
.day:disabled{color:var(--line);cursor:not-allowed;opacity:0.5}
.day.today{font-weight:500;color:var(--terracotta)}
.day.has-slots::after{content:'';position:absolute;bottom:5px;left:50%;transform:translateX(-50%);width:4px;height:4px;border-radius:50%;background:var(--amber)}
.day.selected.has-slots::after{background:var(--gold-soft)}

.slots-panel h3{font-family:'Cormorant Garamond',serif;font-size:1.4rem;font-weight:500;margin-bottom:0.3rem}
.slots-panel .slot-day{color:var(--ink-soft);font-size:0.9rem;margin-bottom:1.5rem}
.slots{display:grid;grid-template-columns:repeat(2,1fr);gap:0.6rem;max-height:280px;overflow-y:auto;padding-right:0.5rem}
.slots::-webkit-scrollbar{width:4px}
.slots::-webkit-scrollbar-track{background:transparent}
.slots::-webkit-scrollbar-thumb{background:var(--line);border-radius:4px}
.slot{padding:0.85rem;border:1px solid var(--line);border-radius:10px;background:transparent;cursor:pointer;font-family:inherit;font-size:0.9rem;color:var(--ink);transition:all 0.2s;text-align:center}
.slot:hover:not(:disabled){border-color:var(--terracotta);color:var(--terracotta)}
.slot.selected{background:var(--ink);color:var(--cream);border-color:var(--ink)}
.slot:disabled{opacity:0.35;cursor:not-allowed;text-decoration:line-through}
.no-slots{grid-column:1 / -1;text-align:center;padding:3rem 1rem;color:var(--ink-soft);font-style:italic}
.no-slots::before{content:'';display:block;width:40px;height:1px;background:var(--line);margin:0 auto 1rem}

.booking .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem;max-width:640px;margin:0 auto}
.booking .form-field.full{grid-column:span 2}
.booking .form-field textarea{min-height:90px}
.field-opt{text-transform:none;letter-spacing:0;color:var(--ink-soft);font-weight:300}
.field-hint{display:block;margin-top:0.35rem;font-size:0.8rem;color:var(--ink-soft);font-style:italic}
.form-field[hidden]{display:none}
.hp-field{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

.summary{max-width:540px;margin:0 auto;background:var(--cream);border-radius:18px;padding:2rem}
.summary-row{display:flex;justify-content:space-between;align-items:flex-start;padding:0.9rem 0;border-bottom:1px solid var(--line);gap:1rem}
.summary-row:last-child{border-bottom:none}
.summary-label{font-size:0.75rem;letter-spacing:0.2em;text-transform:uppercase;color:var(--ink-soft)}
.summary-value{font-family:'Cormorant Garamond',serif;font-size:1.15rem;text-align:right}
.summary-total .summary-value{color:var(--terracotta);font-size:1.4rem;font-weight:500}
.summary-note{margin-top:1.4rem;padding:1rem 1.2rem;border-radius:14px;background:var(--terracotta-tint);color:var(--terracotta-dark);font-size:0.92rem;line-height:1.55}
.summary-note strong{font-weight:500}

.booking-actions{display:flex;justify-content:space-between;margin-top:2.5rem;gap:1rem}
.booking-error{display:none;margin-top:1.8rem;padding:1rem 1.3rem;border-radius:14px;background:rgba(224,128,94,0.12);border:1px solid rgba(224,128,94,0.4);color:var(--terracotta-dark);font-size:0.95rem;line-height:1.5}
.btn-text{background:none;border:none;cursor:pointer;font-family:inherit;color:var(--ink-soft);font-size:0.8rem;letter-spacing:0.2em;text-transform:uppercase;padding:1.1rem 0;transition:color 0.3s}
.btn-text:hover{color:var(--terracotta)}

.confirm-success{text-align:center;padding:2rem 0}
.confirm-icon{width:80px;height:80px;border-radius:50%;background:linear-gradient(135deg, var(--amber) 0%, var(--coral) 100%);margin:0 auto 1.5rem;display:flex;align-items:center;justify-content:center;color:var(--cream);font-size:2.5rem;animation:popIn 0.5s ease}
.confirm-success h3{font-family:'Cormorant Garamond',serif;font-size:2rem;font-weight:400;margin-bottom:0.8rem}
.confirm-success p{color:var(--ink-soft);max-width:440px;margin:0 auto 2rem}

@media (max-width:900px){
  .booking-card{padding:2rem 1.5rem}
  .calendar-wrap{grid-template-columns:1fr;gap:2rem}
  .booking-steps{flex-wrap:wrap;gap:0.5rem;justify-content:flex-start}
  .step-divider{display:none}
  .step{font-size:0.7rem}
  .booking .form-grid{grid-template-columns:1fr}
  .booking .form-field.full{grid-column:span 1}
  .booking-actions{flex-direction:column-reverse}
  .booking-actions .btn{width:100%;justify-content:center}
}
/* Handy: Angebote zu zweit nebeneinander, Schritte in einer Zeile (nur der aktive mit Text) */
@media (max-width:640px){
  .booking-card{padding:1.6rem 1rem;border-radius:24px}
  /* Schritte nur als Nummern über die ganze Breite, der Name steht als Titel darunter */
  .booking-steps{flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:0;margin-bottom:1.6rem}
  .step,.step.active{font-size:0;gap:0}
  .step-num{width:32px;height:32px;font-size:1rem}
  .step-divider{display:block;flex:1;width:auto;margin:0 0.5rem;align-self:center}
  .booking-step-title{display:block;font-family:'Cormorant Garamond',serif;font-size:1.7rem;font-weight:400;line-height:1.15;margin:0 0 1.3rem;position:relative;z-index:2}
  .booking-card[data-step="5"] .booking-step-title{display:none}
  .booking-content{min-height:0}
  .service-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:0.6rem}
  .service-option{padding:0.95rem 0.85rem;border-radius:14px;display:flex;flex-direction:column;min-width:0}
  .service-option-name{font-size:0.98rem;line-height:1.2;hyphens:auto;-webkit-hyphens:auto;overflow-wrap:break-word}
  .service-option-meta{flex-direction:column;align-items:flex-start;gap:0.15rem;margin-top:auto;padding-top:0.45rem;font-size:0.74rem}
  .service-option-note{font-size:0.66rem;line-height:1.3}
}
/* Schritt 1 geht bei Auswahl von selbst weiter, «Weiter» braucht es dort nicht
   (Schritt 2 auch, der Knopf bleibt dort aber für die schon gewählte Zeit nach «Zurück») */
.booking-card[data-step="1"] .booking-actions{display:none !important}
