/* Scheduler screens inside the app (state/lanes/scheduler-design.md 1, 2, 3, 5): Settings › Scheduler
   (pages/settings-scheduler.js), the composer's Meeting scheduler menu + the times block (components/booking-menu.js,
   mail-composer.js; the Pick times modal is in composer.css) and the timeline's 'Booked online' pill (components/timeline.js). Prefix `.sch-`.
   The public booking page has its own file (booking.css). Sprint 2c (schedsafety-design.md C-F): the type modal's
   Limits / Client changes groups, Ontario holidays, the time off cover + overlap line and components/booking-move.js
   (overlap list, Move, Cancel, Give to a colleague, 'See the email'). Sprint 2d (schedextras-design.md A-E, at the end):
   the Check times tab (components/sched-check.js), the move modal's busy grid + override confirm, the timeline's
   booking actions / no-show pill, the activity form's locked booked time and the menu's sent links. */

/* ---- Settings › Scheduler ---- */
.settings-page.sch-page { max-width: 820px; }
.sch-tab-body { display: flex; flex-direction: column; gap: var(--sp-6); }
.sch-types-head { display: flex; align-items: center; gap: var(--sp-6); }
.sch-intro { margin: 0; flex: 1; }
.sch-type-add { flex: none; }

.settings-card.sch-types { padding: 0; gap: 0; overflow: hidden; }
.sch-type-row {
  display: flex; align-items: center; gap: var(--sp-6); min-height: 56px; padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border); cursor: pointer; transition: background var(--t-fast) var(--ease);
}
.sch-type-row:first-child { border-top: 0; }
.sch-type-row:hover { background: var(--bg-hover); }
.sch-type-row:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.sch-type-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.sch-type-name { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-type-summary { font-size: var(--fs-sm); color: var(--text-2); }
.sch-type-row.is-off .sch-type-name, .sch-type-row.is-off .sch-type-summary { color: var(--text-muted); }
.sch-type-switch { flex: none; }
.icon-btn.sch-type-more { width: 32px; height: 32px; flex: none; color: var(--text-2); }
.icon-btn.sch-type-more svg { width: 16px; height: 16px; }
.sch-types-empty { padding: var(--sp-7) var(--sp-6); color: var(--text-2); text-align: center; }

/* Meeting type modal */
.sch-form { display: flex; flex-direction: column; gap: var(--sp-5); }
.sch-form-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.sch-form-label { padding-top: 7px; font-size: var(--fs-sm); color: var(--text-2); }
.sch-form-control { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.sch-form-control > .input, .sch-form-control > .select-trigger { width: 100%; }
.sch-inline { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-5); }
.sch-inline .select-trigger { min-width: 110px; }
.sch-gap { display: inline-flex; align-items: center; gap: var(--sp-3); }
.sch-gap-label { font-size: var(--fs-sm); color: var(--text-2); }
.sch-inline.sch-gaps { flex-wrap: nowrap; gap: var(--sp-6); }
.sch-gaps .select-trigger { width: 100px; min-width: 0; }
.sch-radio { min-height: var(--control-h); }
.sch-price { display: inline-flex; align-items: center; gap: var(--sp-2); }
.sch-price.is-off { opacity: .55; }
.sch-price-sign { color: var(--text-2); }
.sch-price-input { width: 104px; }
.sch-desc { height: auto; min-height: 72px; padding-top: var(--sp-3); padding-bottom: var(--sp-3); resize: vertical; font: inherit; }
/* Two steps (schedpolish-design.md D) */
.sch-type-body { display: flex; flex-direction: column; gap: var(--sp-6); }
.modal.sch-type-modal .modal-head { gap: var(--sp-3); }
/* The title only takes its own width, so the step text sits right after it ('New meeting type · Step 1 of 2') and
   the free space goes before the x (kit.css gives .modal-title flex: 1, which pushed the step text to the x). */
.modal.sch-type-modal .modal-title { flex: 0 1 auto; }
.sch-step-text { font-size: var(--fs-md); color: var(--text-2); margin-right: auto; white-space: nowrap; }
.sch-steps { display: flex; align-items: center; gap: var(--sp-4); }
.sch-step {
  display: inline-flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-sm);
  background: none; color: var(--text-2); font: inherit; cursor: pointer;
}
.sch-step:disabled { cursor: default; }
.sch-step:hover:not(:disabled) { background: var(--bg-hover); }
.sch-step:focus-visible { outline: 2px solid var(--border-focus); }
.sch-step-n {
  width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bg-hover);
  color: var(--text-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
}
.sch-step.is-current { color: var(--text); font-weight: var(--fw-semibold); }
.sch-step.is-current .sch-step-n { background: var(--green); color: var(--text-inverse); }
.sch-step-line { flex: 0 0 40px; height: 1px; background: var(--border); }
.sch-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sch-cols[hidden], .sch-step2[hidden] { display: none; }
.sch-col { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.sch-col-left { padding-right: var(--sp-7); border-right: 1px solid var(--border); }
.sch-col-right { padding-left: var(--sp-7); }
.sch-col-head { margin: 0; display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-semibold); }
.sch-lock, .sch-lock svg { width: 14px; height: 14px; display: block; color: var(--text-2); }
.sch-sub-head { margin: 0 0 var(--sp-2); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.sch-stack { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.sch-stack .sch-form-label { padding-top: 0; }
.sch-stack > .input { width: 100%; }
.sch-step2 { max-width: 520px; }
.sch-fields { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.sch-field-row { display: flex; align-items: center; gap: var(--sp-4); min-height: 36px; border-bottom: 1px solid var(--border); padding: var(--sp-1) 0; }
.sch-field-name { flex: 1; min-width: 0; }
.sch-field-row.is-fixed .sch-field-req { color: var(--text-2); }
.sch-field-req { flex: none; white-space: nowrap; font-size: var(--fs-sm); }
.sch-field-lock-hint { flex: none; margin: 0; white-space: nowrap; color: var(--text-2); font-size: var(--fs-sm); }
.sch-field-lock-hint[hidden] { display: none; }
.sch-field-label.input { flex: 1; min-width: 0; }
.sch-field-row .select-trigger { flex: none; width: 128px; }
.icon-btn.sch-field-remove { flex: none; width: 28px; height: 28px; color: var(--text-2); }
.icon-btn.sch-field-remove svg { width: 16px; height: 16px; }
.icon-btn.sch-field-remove:hover { color: var(--red); }
.sch-field-wrap > .field-error:empty { display: none; }
.sch-field-foot { display: flex; align-items: center; gap: var(--sp-4); padding-top: var(--sp-2); }
.sch-field-foot [hidden], .sch-field-max[hidden] { display: none; }
.sch-field-add {
  align-self: flex-start; border: 0; background: none; padding: 0; height: 28px; color: var(--link); font: inherit; cursor: pointer;
}
.sch-field-add:hover { text-decoration: underline; }
.sch-field-add[hidden], .sch-footer-open[hidden] { display: none; }
.sch-field-add:focus-visible { outline: 2px solid var(--border-focus); }
.sch-footer-open { display: flex; flex-direction: column; gap: var(--sp-2); }
.sch-footer-line { display: flex; align-items: flex-start; gap: var(--sp-3); }
.sch-footer-line .input { flex: 1; min-width: 0; }
.sch-acttypes { flex-wrap: wrap; }
.sch-note { height: auto; min-height: 112px; padding: var(--sp-3) var(--sp-5); border-color: transparent; background: var(--bg-note); resize: vertical; font: inherit; }
.sch-note:focus { border-color: var(--yellow-icon); }
.icon-btn.sch-type-copy { width: 28px; height: 28px; flex: none; color: var(--text-2); }
.icon-btn.sch-type-copy svg { width: 16px; height: 16px; }
.icon-btn.sch-type-copy:hover:not(:disabled) { color: var(--text); }
.icon-btn.sch-type-copy:disabled { color: var(--text-muted); cursor: default; }
@media (max-width: 760px) {
  .sch-cols { grid-template-columns: 1fr; gap: var(--sp-6); }
  .sch-col-left { padding-right: 0; border-right: 0; padding-bottom: var(--sp-6); border-bottom: 1px solid var(--border); }
  .sch-col-right { padding-left: 0; }
}
@media (max-width: 560px) {
  .sch-form-row { grid-template-columns: 1fr; gap: var(--sp-2); }
  .sch-form-label { padding-top: 0; }
}

/* Availability */
.sch-section { display: flex; flex-direction: column; gap: var(--sp-5); padding-bottom: var(--sp-7); border-bottom: 1px solid var(--border); }
.sch-section:last-child { border-bottom: 0; }
.sch-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); }
.sch-h2 { margin: 0; font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-semibold); }
.sch-tz { font-size: var(--fs-sm); color: var(--text-2); }
.sch-days { display: flex; flex-direction: column; gap: var(--sp-4); }
.sch-day { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.sch-day-name { min-height: var(--control-h); font-weight: var(--fw-semibold); }
.sch-day-main { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.sch-ranges { display: flex; flex-direction: column; gap: var(--sp-3); }
.sch-range { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-4); }
.sch-range .select-trigger { width: 118px; }
.sch-dash { color: var(--text-2); }
.icon-btn.sch-range-remove, .icon-btn.sch-timeoff-remove { width: 32px; height: 32px; color: var(--text-2); }
.icon-btn.sch-range-remove svg, .icon-btn.sch-timeoff-remove svg { width: 16px; height: 16px; }
.icon-btn.sch-range-remove:hover, .icon-btn.sch-timeoff-remove:hover { color: var(--red); }
.sch-range-add {
  border: 0; background: none; padding: 0 var(--sp-2); height: var(--control-h); color: var(--link); font: inherit;
  font-size: var(--fs-md); cursor: pointer; border-radius: var(--r-sm);
}
.sch-range-add:hover { text-decoration: underline; }
.sch-range-add:disabled { color: var(--text-muted); cursor: default; text-decoration: none; }
.sch-range-add:focus-visible { outline: 2px solid var(--border-focus); }
.sch-unavailable { display: inline-flex; align-items: center; min-height: var(--control-h); color: var(--text-muted); }
.sch-actions { display: flex; justify-content: flex-end; gap: var(--sp-4); }
.sch-actions .btn .spinner { margin-right: var(--sp-2); }

.sch-outlook-line { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-4); font-size: var(--fs-md); }
.sch-outlook-line .ic, .sch-outlook-line .ic svg { width: 18px; height: 18px; display: block; flex: none; }
.sch-outlook-line.is-on .ic { color: var(--green); }
.sch-outlook-line.is-off .ic { color: var(--yellow-icon); }
.sch-outlook-line .btn { margin-left: auto; text-decoration: none; }

.sch-timeoff { display: flex; flex-direction: column; }
.sch-timeoff-row {
  display: flex; align-items: center; gap: var(--sp-6); min-height: 40px; border-top: 1px solid var(--border);
}
.sch-timeoff-row:first-child { border-top: 0; }
.sch-timeoff-when { min-width: 240px; font-size: var(--fs-md); }
.sch-timeoff-note { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-timeoff-empty { color: var(--text-2); }
.popover.sch-timeoff-pop { width: 360px; max-width: calc(100vw - 16px); }
.sch-timeoff-form { display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-6); }
.sch-mini { display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-2); flex: 1; min-width: 0; }
.sch-mini .input { width: 100%; color: var(--text); }
.sch-timeoff-times[hidden] { display: none; }
.sch-timeoff-times .select-trigger { width: 110px; }
.check.is-off { color: var(--text-muted); cursor: default; }

/* Sprint 2c: type modal step 2 groups (schedsafety-design.md C) */
.sch-group { display: flex; flex-direction: column; gap: var(--sp-5); padding-top: var(--sp-6); border-top: 1px solid var(--border); }
.sch-group-head { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.sch-cap-box { display: flex; flex-direction: column; gap: var(--sp-3); }
.sch-cap { display: inline-flex; align-items: center; gap: var(--sp-3); }
.input.sch-cap-input { width: 72px; height: var(--control-h); padding-left: var(--sp-3); padding-right: var(--sp-2); }
.input.sch-cap-input::placeholder { font-size: var(--fs-sm); }
.sch-cap-unit { font-size: var(--fs-sm); color: var(--text-2); }
.sch-cap-units { gap: var(--sp-5); }
.sch-inline.sch-change { gap: var(--sp-3); flex-wrap: nowrap; }
.sch-change .select-trigger { width: 130px; min-width: 0; flex: none; }
.sch-self-cancel { min-height: var(--control-h); }
[data-testid=sch-type-self-cancel-hint][hidden] { display: none; }

/* Ontario holidays (design D) */
.sch-holidays { display: flex; flex-direction: column; }
.sch-hol-row { display: flex; align-items: center; gap: var(--sp-6); min-height: 40px; border-top: 1px solid var(--border); }
.sch-hol-row:first-child { border-top: 0; }
.sch-hol-date { min-width: 150px; font-size: var(--fs-md); }
.sch-hol-name { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-hol-switch { flex: none; }
.sch-hol-switch.is-locked { cursor: default; }
.sch-hol-switch .switch:disabled { opacity: .6; cursor: default; }
.sch-hol-firm[hidden], .sch-hol-more[hidden] { display: none; }
.sch-hol-foot { display: flex; justify-content: flex-end; }
.sch-hol-foot:has(.sch-hol-more[hidden]) { display: none; }
.btn-link.sch-hol-more, .btn-link.sch-timeoff-overlap {
  border: 0; background: none; padding: 0; color: var(--link); font: inherit; font-size: var(--fs-md); cursor: pointer;
}
.btn-link.sch-hol-more:hover, .btn-link.sch-timeoff-overlap:hover { text-decoration: underline; }

/* Time off: cover + bookings left to move (design E, F) */
.sch-timeoff-cover { color: var(--text-2); }
[data-testid=sch-timeoff-cover-hint][hidden] { display: none; }
.btn-link.sch-timeoff-overlap { flex: none; display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--yellow-text); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.sch-timeoff-overlap .ic, .sch-timeoff-overlap .ic svg { width: 14px; height: 14px; display: block; color: var(--yellow-icon); }

/* components/booking-move.js: overlap list, Move, Cancel (design F) */
.sch-overlap-body { display: flex; flex-direction: column; gap: var(--sp-5); }
.sch-overlap-intro { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.sch-overlap-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sch-overlap-row {
  /* Fix round 3: the date / time column is as wide as its text ('Tue, Oct 20 · 10:00 AM' never runs into the type),
     with a real 16px gap; 'Type · Client' takes the rest and wraps. */
  display: grid; grid-template-columns: max-content minmax(0, 1fr) auto; grid-template-areas: "when what actions";
  align-items: center; gap: var(--sp-2) var(--sp-6); min-height: 48px; padding: var(--sp-3) 0; border-top: 1px solid var(--border);
}
.sch-overlap-row:first-child { border-top: 0; }
.sch-overlap-when { grid-area: when; font-weight: var(--fw-semibold); white-space: nowrap; }
/* Fix round 3: 'Free consult · <name>' wraps instead of cutting the name with '...' (staff must see who it is);
   the pill wraps under it when there is no room beside it. */
.sch-overlap-what { grid-area: what; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); min-width: 0; color: var(--text-2); }
.sch-overlap-line { min-width: 0; overflow-wrap: anywhere; }
.sch-overlap-client { color: var(--link); }
.sch-overlap-held {
  flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 var(--sp-3); border-radius: var(--r-pill);
  background: var(--bg-note); color: var(--yellow-text); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap;
}
.sch-overlap-actions { grid-area: actions; display: inline-flex; align-items: center; gap: var(--sp-3); justify-self: end; white-space: nowrap; }
/* Three buttons (Give to <colleague>) don't fit beside the name: they go on their own line, right-aligned, together. */
.sch-overlap-row.has-give { grid-template-columns: max-content minmax(0, 1fr); grid-template-areas: "when what" "actions actions"; }
.sch-overlap-give-why { font-size: var(--fs-sm); color: var(--text-2); }
/* A cancelled or given row stays (greyed) so staff can open the lead and send a new time. */
.sch-overlap-row.is-cancelled .sch-overlap-when, .sch-overlap-row.is-cancelled .sch-overlap-line { color: var(--text-muted); }
.sch-overlap-row.is-cancelled:not(.is-given) .sch-overlap-when { text-decoration: line-through; }
.sch-overlap-cancelled { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-muted); }
@media (max-width: 560px) {
  .sch-overlap-row, .sch-overlap-row.has-give {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when actions" "what what";
  }
  .sch-overlap-when { white-space: normal; }
  .sch-overlap-row.has-give { grid-template-areas: "when when" "what what" "actions actions"; }
  .sch-overlap-row.has-give .sch-overlap-actions { justify-self: start; }
}
.sch-overlap-empty { padding: var(--sp-5) 0; color: var(--text-2); }
.sch-move-body, .sch-cancel-body { display: flex; flex-direction: column; gap: var(--sp-5); }
.sch-move-body p, .sch-cancel-body p { margin: 0; }
.sch-move-what { color: var(--text); }
.sch-move-pick { align-items: flex-start; flex-wrap: nowrap; }
.sch-move-pick .select-trigger { width: 100%; }
.sch-cancel-reason { min-height: 56px; }
.sch-move-body > .field-error:empty, .sch-cancel-body > .field-error:empty { display: none; }
/* 'See the email' (fix round 2): the exact client email, before Move / Cancel booking / Give. */
.sch-email-hint { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4); }
.btn-link.sch-email-link {
  border: 0; background: none; padding: 0; color: var(--link); font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.btn-link.sch-email-link:hover { text-decoration: underline; }
.sch-email-preview {
  display: flex; flex-direction: column; gap: var(--sp-3); max-height: 220px; overflow: auto; padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-app); font-size: var(--fs-sm);
}
.sch-email-preview[hidden] { display: none; }
.sch-email-preview.is-loading { opacity: .6; }
.sch-email-subject { font-weight: var(--fw-semibold); color: var(--text); }
.sch-email-subject:empty { display: none; }
.sch-email-text { color: var(--text); overflow-wrap: anywhere; }   /* the server's email HTML (<p> per line) */
.sch-email-text p { margin: 0 0 var(--sp-2); }
.sch-email-text p:last-child { margin-bottom: 0; }
.sch-cancel-final { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--red); }
@media (max-width: 640px) {
  .sch-types-head { flex-direction: column; align-items: stretch; }
  .sch-day { grid-template-columns: 1fr; gap: var(--sp-2); }
  .sch-timeoff-when { min-width: 0; }
}

/* ---- Composer: Meeting scheduler menu (booking-menu.js; schedpolish-design.md A) ---- */
.popover.mail-booking-pop { width: 300px; max-width: calc(100vw - 16px); }
.mail-booking-head { padding: var(--sp-4) var(--sp-6) var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.mail-booking-existing { padding: var(--sp-3) var(--sp-6) var(--sp-2); font-size: var(--fs-sm); color: var(--text-2); }
.mail-booking-row { display: flex; align-items: center; padding-right: var(--sp-3); }
.mail-booking-row .menu-item { flex: 1; min-width: 0; }
.mail-booking-row .menu-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.mail-booking-copy {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--text-2); cursor: pointer;
}
.icon-btn.mail-booking-copy svg { width: 16px; height: 16px; display: block; }
.icon-btn.mail-booking-copy:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn.mail-booking-copy:focus-visible { outline: 2px solid var(--border-focus); }
.mail-booking-with { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-6); font-size: var(--fs-sm); color: var(--text-2); }
.mail-booking-with .select-trigger { flex: 1; min-width: 0; }
.mail-booking-none { padding: var(--sp-3) var(--sp-6) var(--sp-4); color: var(--text-2); display: flex; flex-direction: column; gap: var(--sp-3); }
.mail-booking-none a { color: var(--link); }
.mail-booking-hint { padding: 0 var(--sp-6) var(--sp-2); font-size: var(--fs-sm); color: var(--text-2); }
.menu-item.mail-booking-pick { color: var(--link); }
.mail-booking-error { padding: var(--sp-3) var(--sp-6); color: var(--red); font-size: var(--fs-sm); }
.mail-booking-error:empty { display: none; }
/* The button inside the editor: one piece (contenteditable=false). Its look comes from its inline style
   (the email-safe one); this only adds the selected outline and keeps the caret off it. */
.mail-body-editor .mail-booking-btn { cursor: default; user-select: all; }
.mail-body-editor .mail-booking-btn:focus, .mail-body-editor .mail-booking-btn.is-picked { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.tpl-chip.mail-booking-missing { cursor: default; }
/* The Pick times block in the editor: one piece; its look is its email-safe inline styles. */
.mail-body-editor .mail-times-block { margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); cursor: default; user-select: all; }
.mail-body-editor .mail-times-block:hover { background: var(--bg-hover); }
.mail-body-editor .mail-times-block a { pointer-events: none; }
.mail-body-editor .mail-times-block:focus { outline: 2px solid var(--border-focus); outline-offset: 2px; }
/* Its bar (fix round 2): Change times / Remove at the block's top right on hover or focus; outside the saved html. */
.mail-times-bar {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1);
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-surface); box-shadow: var(--shadow-popover);
}
.mail-times-bar[hidden] { display: none; }
.mail-times-bar-btn {
  height: 24px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-sm); background: none; color: var(--link);
  font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap;
}
.mail-times-bar-btn:hover { background: var(--bg-hover); }
.mail-times-bar-btn:focus-visible { outline: 2px solid var(--border-focus); }
.mail-times-bar-btn[data-testid=mail-times-remove] { color: var(--text-2); }
.mail-times-bar-btn[data-testid=mail-times-remove]:hover { color: var(--red); }
/* The line above Send when picked times are no longer free. */
.mail-template-missing.mail-times-stale { margin-top: var(--sp-4); }
.mail-times-stale .btn-link { padding: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---- Timeline: an activity a client booked online ---- */
.tl-booked-pill {
  display: inline-flex; align-items: center; gap: var(--sp-2); height: 20px; padding: 0 var(--sp-3); margin-left: var(--sp-3);
  border-radius: var(--r-pill); background: var(--bg-hover); color: var(--text-2); font-size: var(--fs-xs);
  font-weight: var(--fw-semibold); white-space: nowrap; vertical-align: middle;
}
.tl-booked-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.tl-line.tl-booking { color: var(--text); }

/* ---- Sprint 2d, scheduler extras (schedextras-design.md A-E) ---- */
/* Warning lines (Outlook unreadable, type off): yellow icon colour on the note background. */
.sch-warn {
  display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-sm);
  background: var(--bg-note); color: var(--yellow-text); font-size: var(--fs-sm); overflow-wrap: anywhere;
}
.sch-warn[hidden] { display: none; }

/* A. Check times tab (components/sched-check.js) */
.sch-check-head { display: flex; flex-direction: column; gap: var(--sp-2); }
.sch-check-title { margin: 0; font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-semibold); }
.settings-card.sch-check { border-radius: var(--r-md); gap: var(--sp-5); }
.sch-check-picks { display: flex; flex-wrap: wrap; gap: var(--sp-5) var(--sp-6); align-items: flex-end; }
.sch-check-pick { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1 1 180px; min-width: 0; }
.sch-check-pick-date { flex: 0 1 170px; }
.sch-check-label { font-size: var(--fs-sm); color: var(--text-2); }
.sch-check-pick .select-trigger, .sch-check-pick .input { width: 100%; min-width: 0; }
.sch-check-control { min-width: 0; }
.sch-check-out { display: flex; flex-direction: column; gap: var(--sp-4); border-top: 1px solid var(--border); padding-top: var(--sp-5); }
.sch-check-summary-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-6); }
.sch-check-summary { font-weight: var(--fw-semibold); color: var(--text); }
.sch-check-hidden { font-size: var(--fs-sm); color: var(--text-2); }
.sch-check-rows { display: flex; flex-direction: column; }
.sch-check-row {
  display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2) var(--sp-5);
  min-height: 36px; padding: var(--sp-2) 0; border-top: 1px solid var(--border);
}
.sch-check-row:first-child { border-top: 0; }
.sch-check-time { font-size: var(--fs-md); color: var(--text-2); white-space: nowrap; }
.sch-check-reason { font-size: var(--fs-md); color: var(--text); overflow-wrap: anywhere; }
.sch-check-open { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--green); }
.sch-check-fix { font-size: var(--fs-sm); white-space: nowrap; justify-self: end; }
.sch-check-day { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-5); color: var(--text); overflow-wrap: anywhere; }
.sch-check-none, .sch-check-empty { color: var(--text-2); }
.sch-check-error { display: flex; align-items: center; gap: var(--sp-5); color: var(--text); }
@media (max-width: 560px) {
  .sch-check-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "time fix" "why why"; }
  .sch-check-time { grid-area: time; white-space: normal; }
  .sch-check-reason, .sch-check-open { grid-area: why; }
  .sch-check-fix { grid-area: fix; }
  .settings-card.sch-check { padding: var(--sp-5); }
}

/* C. Move booking: the day's grid with busy markers (components/booking-move.js) */
.sch-move-day { flex: none; max-width: 200px; }
.sch-move-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.sch-move-grid[hidden] { display: none; }
.sch-move-grid.is-loading { opacity: .6; }
.sch-move-slot {
  min-height: var(--control-h); padding: var(--sp-2) var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-surface); color: var(--text); font: inherit; font-weight: var(--fw-semibold); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 16px;
}
.sch-move-slot:hover { border-color: var(--border-focus); }
.sch-move-slot:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.sch-move-slot.is-busy { background: var(--bg-hover); color: var(--text-muted); }
.sch-move-slot-tag { font-size: var(--fs-xs); font-weight: var(--fw-regular); color: var(--text-2); }
.sch-move-slot.is-busy .sch-move-slot-tag { color: var(--text-muted); }
.sch-move-slot.is-selected { background: var(--bg-selected); border-color: var(--border-focus); color: var(--text); }
.sch-move-reasons { font-size: var(--fs-sm); color: var(--text); overflow-wrap: anywhere; }
.sch-move-reasons[hidden], .sch-move-nohours[hidden] { display: none; }
.sch-move-nohours { color: var(--text-2); }
.sch-override-text { display: flex; flex-direction: column; gap: var(--sp-3); }
.sch-override-text p { margin: 0; }
.sch-override-list { margin: 0; padding-left: var(--sp-7); color: var(--text); overflow-wrap: anywhere; }
.sch-override-list strong { font-weight: var(--fw-semibold); }
@media (max-width: 420px) {
  .sch-move-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* B. Timeline: Move · Client didn't show (a link like Move, in --text-2 so it is quieter than the blue Move), the no-show mark and Offer to rebook (components/timeline.js) */
.tl-booking-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-2); font-size: var(--fs-sm); }
.tl-booking-actions .link-btn { font-size: var(--fs-sm); }
.tl-booking-actions .link-btn.tl-noshow { color: var(--text-2); }
.tl-booking-sep { color: var(--text-muted); }
.tl-noshow-meta { font-size: var(--fs-xs); color: var(--text-2); }
.tl-booking-actions .tl-noshow-undo { font-size: var(--fs-xs); }
.tl-booking-actions .tl-rebook { height: 28px; margin-left: var(--sp-3); }
.tl-pill.tl-noshow-pill { margin-left: var(--sp-3); color: var(--red); vertical-align: middle; }

/* D. Activity form: a booked activity's time is read-only (components/activity-form.js) */
.actf-when.actf-booked { gap: var(--sp-2) var(--sp-5); }
.actf-booked-text { color: var(--text); }
.actf-booked-hint { flex-basis: 100%; font-size: var(--fs-sm); color: var(--text-2); }

/* E. Composer menu: links sent to this lead / deal with Turn off (components/booking-menu.js) */
.mail-booking-sent { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-6); font-size: var(--fs-sm); }
.mail-booking-sent-text { flex: 1; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.link-btn.mail-booking-link-off { flex: none; font-size: var(--fs-sm); color: var(--red); }
