/* The booking widget (app/booking.js). Colours come from the host page's tokens (--p-*), so it sits in wellness,
   proposal templates and saunas alike. Logical properties throughout: Arabic, Hebrew, Persian and Urdu mirror it. */
[data-castomo-booking][data-team=""] { display: none; }
.cb { --cb-line: color-mix(in srgb, var(--p-ink, #000) 14%, transparent); margin-top: 24px; display: grid; gap: 18px; max-width: 880px; }
.cb__label { font-weight: 600; margin: 0; }
.cb__muted { color: var(--p-muted, #555); margin: 0; font-size: .95em; }
.cb__ico { display: inline-grid; place-items: center; flex: none; width: 1.15em; height: 1.15em; }
.cb__ico svg { width: 100%; height: 100%; }

/* the steps: 1 Date and time — 2 Your details; the current one filled, a done one ticked */
.cb__steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; counter-reset: none; }
.cb__step { display: flex; align-items: center; gap: 10px; color: var(--p-muted, #555); font-weight: 600; }
.cb__step + .cb__step::before { content: ""; width: clamp(20px, 6vw, 56px); height: 2px; border-radius: 2px; background: var(--cb-line); }
.cb__num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--cb-line); font-variant-numeric: tabular-nums; font-size: .9em; }
.cb__step[aria-current="step"] { color: var(--p-ink, #000); }
.cb__step[aria-current="step"] .cb__num { background: var(--p-action, #0b4554); border-color: var(--p-action, #0b4554); color: var(--p-action-ink, #fff); }
.cb__step[data-done] .cb__num { border-color: var(--p-accent, #0b4554); color: var(--p-accent, #0b4554); }
.cb__step[data-done] .cb__num .cb__ico { width: 16px; height: 16px; }

.cb__headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cb__meta { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--p-muted, #555); }
.cb__meta strong { color: var(--p-ink, #000); }
.cb__link { background: none; border: 0; padding: 4px 0; color: var(--p-accent, #0b4554); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* the card: the calendar and the chosen day's times side by side, stacked on a phone */
.cb__card { padding: clamp(16px, 3vw, 28px); border: 1px solid var(--cb-line); border-radius: 20px; background: var(--p-bg, #fff); box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 12px 32px -12px rgb(0 0 0 / .12); animation: cb-in .25s ease-out; }
.cb__card--pick { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px clamp(20px, 4vw, 40px); }
.cb__pane { display: grid; align-content: start; gap: 6px; padding-inline-start: clamp(20px, 4vw, 40px); border-inline-start: 1px solid var(--cb-line); }
.cb__zone { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0; padding-top: 14px; border-top: 1px solid var(--cb-line); color: var(--p-muted, #555); font-size: .9em; }
@media (max-width: 680px) {
  .cb__card--pick { grid-template-columns: 1fr; }
  .cb__pane { padding-inline-start: 0; border-inline-start: 0; padding-top: 18px; border-top: 1px solid var(--cb-line); }
}

.cb__nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cb__range { font-weight: 700; text-align: center; }
.cb__arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--cb-line); border-radius: 50%; background: none; color: var(--p-ink, #000); cursor: pointer; transition: border-color .15s, background-color .15s; }
.cb__arrow .cb__ico { width: 20px; height: 20px; transition: transform .2s; }
.cb__arrow:hover:not(:disabled) { border-color: var(--p-accent, #0b4554); }
.cb__arrow:hover:not(:disabled) .cb__ico--prev { transform: translateX(-2px); }
.cb__arrow:hover:not(:disabled) .cb__ico--next { transform: translateX(2px); }
.cb__arrow:disabled { opacity: .3; cursor: default; }
[dir="rtl"] .cb__arrow .cb__ico { scale: -1 1; }

/* two weeks, Monday first: a day with free times is a filled-in button, the rest are only numbers */
.cb__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.cb__dow { padding-bottom: 4px; color: var(--p-muted, #555); font-size: .78em; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb__cal { container-type: inline-size; }
.cb__dow > span + span { display: none; }
@container (max-width: 340px) { .cb__dow > span:first-child { display: none; } .cb__dow > span + span { display: inline; } }
.cb__day { position: relative; aspect-ratio: 1; max-height: 52px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--p-accent, #0b4554) 10%, transparent); color: var(--p-ink, #000); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.cb__day:hover:not(:disabled) { background: color-mix(in srgb, var(--p-accent, #0b4554) 22%, transparent); }
.cb__day:active:not(:disabled) { transform: scale(.94); }
.cb__day:disabled { background: none; color: color-mix(in srgb, var(--p-ink, #000) 30%, transparent); font-weight: 400; cursor: default; }
.cb__day[aria-pressed="true"] { background: var(--p-action, #0b4554); color: var(--p-action-ink, #fff); }
.cb__day[data-today]::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

.cb__day-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; font-size: 1.15em; font-weight: 700; }
/* the zone, named where the times are read */
.cb__utc { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--p-accent, #0b4554) 12%, transparent); color: var(--p-accent, #0b4554); font-size: .7em; font-weight: 700; letter-spacing: .04em; }
.cb__times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.cb__time { padding: 11px 8px; border: 1px solid var(--cb-line); border-radius: 12px; background: var(--p-bg, #fff); color: var(--p-ink, #000); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s, transform .15s; }
.cb__time:hover { border-color: var(--p-action, #0b4554); background: var(--p-action, #0b4554); color: var(--p-action-ink, #fff); }
.cb__time:active { transform: scale(.96); }

.cb__types { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cb__type, .cb__slot { display: grid; gap: 4px; text-align: start; padding: 16px; border: 1px solid var(--cb-line); border-radius: 12px; background: var(--p-surface, #f1efeb); color: var(--p-ink, #000); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.cb__type:hover, .cb__slot:hover:not(:disabled) { border-color: var(--p-accent, #0b4554); }
.cb__type:active, .cb__slot:active { transform: scale(.98); }
.cb__slot:disabled { opacity: .5; cursor: default; }
.cb__type small, .cb__slot small { color: var(--p-muted, #555); }
.cb__sessions { display: grid; gap: 10px; }

/* step 2: the chosen time on top (with Back to change it), then the fields */
.cb__chosen { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--p-surface, #f1efeb); }
.cb__chosen > .cb__ico { width: 22px; height: 22px; color: var(--p-accent, #0b4554); }
.cb__chosen > span:not(.cb__ico) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.cb__chosen small { color: var(--p-muted, #555); }
.cb__form { display: grid; gap: 18px; }
.cb__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 560px) { .cb__fields { grid-template-columns: 1fr; } }
.cb__form label { display: grid; gap: 6px; font-weight: 500; }
.cb__form input, .cb__form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--p-ink, #000) 25%, transparent); border-radius: 8px; background: var(--p-bg, #fff); color: var(--p-ink, #000); }
.cb__form textarea { resize: vertical; }
.cb__form input:focus-visible, .cb__form textarea:focus-visible, .cb button:focus-visible { outline: 2px solid var(--p-accent, #0b4554); outline-offset: 2px; }
.cb__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* Its own look where the host page has no .btn (proposal templates, saunas). */
.cb__submit { display: inline-flex; align-items: center; gap: 10px; }
.cb__submit:not(.btn--styled) { padding: 12px 20px; border: 0; border-radius: 999px; background: var(--p-action, #0b4554); color: var(--p-action-ink, #fff); font: inherit; font-weight: 600; cursor: pointer; }
.cb__submit .cb__ico { width: 18px; height: 18px; transition: transform .2s; }
.cb__submit:hover:not(:disabled) .cb__ico { transform: translateX(4px); }
[dir="rtl"] .cb__submit .cb__ico { scale: -1 1; }
[dir="rtl"] .cb__submit:hover:not(:disabled) .cb__ico { transform: translateX(-4px); }
.cb__submit:disabled { opacity: .6; cursor: default; }
.cb__status:empty { display: none; }
.cb__status { margin: 0; font-weight: 600; }

.cb__done { display: grid; justify-items: start; gap: 12px; }
.cb__badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--p-action, #0b4554); color: var(--p-action-ink, #fff); animation: cb-pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.cb__badge .cb__ico { width: 26px; height: 26px; }
.cb__done-title { margin: 0; font-size: 1.15em; font-weight: 700; }
.cb__done .cb__chosen { align-self: stretch; }

@keyframes cb-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes cb-pop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cb__card, .cb__badge { animation: none; }
  .cb__type, .cb__slot, .cb__time, .cb__day, .cb__arrow, .cb__ico { transition: none; }
}
