/* =========================================================================
   Időpontfoglalás — booking wizard styles
   ========================================================================= */

.booking {
  padding-block: clamp(1.6rem, 4vw, 2.6rem) clamp(3rem, 7vw, 5rem);
}
.booking__layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(1.4rem, 3vw, 2.2rem);
  align-items: start;
}
/* Let the grid items shrink below their content's intrinsic width so the
   horizontally-scrolling date strip stays inside the panel (instead of
   stretching the whole wizard and overflowing the screen on mobile). */
.booking__layout > * { min-width: 0; }

/* ---- progress bar -------------------------------------------------- */
.steps-bar { display: flex; gap: .5rem; margin-bottom: 1.6rem; }
.steps-bar li {
  flex: 1; display: flex; flex-direction: column; gap: .5rem;
  font-size: .82rem; color: var(--faint); font-weight: 600;
}
.steps-bar li .bar { height: 5px; border-radius: 999px; background: var(--line); transition: background .3s ease; }
.steps-bar li .lbl { display: flex; align-items: center; gap: .4rem; }
.steps-bar li .num {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: .72rem;
  background: var(--line); color: var(--faint);
}
.steps-bar li.is-active .bar { background: var(--primary); }
.steps-bar li.is-active .num { background: var(--primary); color: #fff; }
.steps-bar li.is-active { color: var(--ink); }
.steps-bar li.is-done .bar { background: var(--primary); }
.steps-bar li.is-done .num { background: var(--ok); color: #fff; }
.steps-bar li.is-done .lbl span:last-child { color: var(--muted); }

/* ---- panel --------------------------------------------------------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: clamp(1.3rem, 3vw, 2.1rem);
}
.panel__step { display: none; animation: fade .35s ease; }
.panel__step.is-current { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel__head { margin-bottom: 1.4rem; }
.panel__head .kicker { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.panel__head h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-top: .35rem; }
.panel__head p { color: var(--muted); margin-top: .4rem; font-size: .96rem; }

/* ---- selectable option grid --------------------------------------- */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .7rem; }
.opt {
  position: relative; display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); transition: .15s ease; width: 100%;
}
.opt:hover { border-color: var(--primary-100); background: var(--primary-050); }
.opt.is-selected { border-color: var(--primary); background: var(--primary-050); box-shadow: 0 0 0 3px var(--primary-100); }
.opt__ico { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--primary-050); color: var(--primary); display: grid; place-items: center; }
.opt.is-selected .opt__ico { background: var(--primary); color: #fff; }
.opt__ico svg { width: 20px; height: 20px; }
.opt__txt b { display: block; font-size: .98rem; line-height: 1.2; }
.opt__txt small { color: var(--faint); font-size: .82rem; }
.opt__check {
  position: absolute; top: .55rem; right: .6rem; width: 18px; height: 18px;
  border-radius: 50%; background: var(--primary); color: #fff;
  display: none; place-items: center;
}
.opt.is-selected .opt__check { display: grid; }
.opt__check svg { width: 12px; height: 12px; }

/* ---- doctor option (wider) ---------------------------------------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.opt--doc { align-items: flex-start; }
.opt--doc .opt__ico { width: 44px; height: 44px; border-radius: 50%; font-family: var(--font-head); font-weight: 600; font-size: .95rem; }

/* ---- location toggle ---------------------------------------------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button {
  border: 0; background: transparent; padding: .55rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: .92rem; color: var(--muted); transition: .15s ease;
}
.seg button.is-on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ---- date strip ---------------------------------------------------- */
.field-label { font-weight: 600; font-size: .92rem; margin: 1.3rem 0 .6rem; display: block; }
.date-strip { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.date-cell {
  flex: none; width: 62px; padding: .6rem 0; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); transition: .15s ease;
}
.date-cell:hover:not(:disabled) { border-color: var(--primary-100); }
.date-cell .dow { font-size: .72rem; color: var(--faint); text-transform: uppercase; }
.date-cell .dnum { font-family: var(--font-head); font-size: 1.3rem; line-height: 1.1; }
.date-cell .mon { font-size: .7rem; color: var(--faint); }
.date-cell.is-selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.date-cell.is-selected .dow, .date-cell.is-selected .mon { color: rgba(255,255,255,.85); }
.date-cell:disabled { opacity: .4; cursor: not-allowed; }

/* ---- time slots ---------------------------------------------------- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: .55rem; margin-top: .3rem; }
.slot {
  padding: .65rem .2rem; text-align: center; font-weight: 600; font-size: .95rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); transition: .15s ease;
  font-variant-numeric: tabular-nums;
}
.slot:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.slot.is-selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot:disabled { color: var(--faint); background: var(--surface-2); border-color: var(--surface-2); text-decoration: line-through; cursor: not-allowed; }
.slots-empty { color: var(--muted); font-size: .95rem; padding: 1rem; background: var(--surface-2); border-radius: var(--radius-sm); }

/* ---- form fields --------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field label .req { color: var(--accent); }
.field input, .field textarea, .field select {
  font: inherit; padding: .75rem .85rem; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100);
}
.field textarea { resize: vertical; min-height: 92px; }
.field small { color: var(--faint); font-size: .82rem; }
.field.has-error input, .field.has-error textarea { border-color: #d6453f; box-shadow: 0 0 0 3px #fbe3e2; }
.field .err { color: #c2362f; font-size: .82rem; display: none; }
.field.has-error .err { display: block; }

.consent { display: flex; gap: .65rem; align-items: flex-start; margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.consent input { margin-top: .2rem; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.consent.has-error { color: #c2362f; }

/* ---- nav buttons --------------------------------------------------- */
.panel__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.panel__nav .btn--ghost svg { transform: rotate(180deg); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---- summary sidebar ----------------------------------------------- */
.summary {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.summary__head { background: var(--primary-050); padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.summary__head b { font-family: var(--font-head); font-size: 1.1rem; }
.summary__head p { font-size: .85rem; color: var(--muted); margin-top: .2rem; }
.summary__body { padding: 1.1rem 1.3rem; }
.summary__row { display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.summary__row:last-of-type { border-bottom: 0; }
.summary__row .ico { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--primary-050); color: var(--primary); display: grid; place-items: center; }
.summary__row .ico svg { width: 17px; height: 17px; }
.summary__row .k { font-size: .76rem; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.summary__row .v { font-weight: 600; font-size: .95rem; }
.summary__row .v.empty { color: var(--faint); font-weight: 500; }
.summary__note { padding: 0 1.3rem 1.3rem; font-size: .8rem; color: var(--faint); display: flex; gap: .5rem; }
.summary__note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--primary); }

/* ---- success ------------------------------------------------------- */
.done { text-align: center; padding: clamp(1.5rem, 4vw, 2.4rem) 1rem; }
.done__check {
  width: 78px; height: 78px; margin: 0 auto 1.2rem; border-radius: 50%;
  background: var(--ok-100); color: var(--ok); display: grid; place-items: center;
  animation: pop .4s ease;
}
.done__check svg { width: 40px; height: 40px; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.done h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.done p { color: var(--muted); margin-top: .6rem; max-width: 36em; margin-inline: auto; }
.done__ref {
  display: inline-block; margin: 1.4rem 0; padding: .7rem 1.4rem;
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 999px;
  font-family: var(--font-head); font-size: 1.2rem; letter-spacing: .05em;
}
.done__recap { max-width: 420px; margin: 1.4rem auto 0; text-align: left; }

/* ---- responsive ---------------------------------------------------- */
@media (max-width: 900px) {
  .booking__layout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .summary__body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .summary__row { border-bottom: 0; padding: .5rem 0; }
  .summary__note { display: none; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .summary__body { grid-template-columns: 1fr; }
  .steps-bar li .lbl span:last-child { display: none; }
  .panel__nav { flex-direction: row; }
}
