/* Bookings page calendar (calendar.js): a day with a column per team member. Bright fills say what the booking is
   (its service group or person); marks say where it's up to (Now, faded ✓ done). */
.wrap.wide { max-width: 1180px; }
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.cal-icon:hover { background: var(--soft); }
.cal-page-title { margin-bottom: 14px; }
.cal-title { margin: 0 4px; font-size: 18px; } .cal-title small { display: block; font-size: 12px; color: var(--pick); font-weight: 700; }
.cal-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-people { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-people button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 4px; border-radius: 99px; border: 0; background: var(--soft); /* like the person buttons on Home and Bookings */ font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; transition: opacity .2s; }
.cal-people button[aria-pressed="false"] { opacity: .45; }
.cal-av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #0d0d12; font-size: 10px; font-weight: 800; flex: none; }
.cal-av.big { width: 36px; height: 36px; font-size: 13px; } .cal-av.dark { background: var(--ink); color: var(--surface); }
.cal-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; }
.cal-seg span { padding: 0 6px 0 8px; color: var(--muted); font-weight: 700; }
.cal-seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 99px; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.cal-seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }

.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.cal-wd { padding: 8px 4px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: var(--shadow); font: inherit; cursor: pointer; color: var(--ink); text-align: center; }
.cal-wd span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; } .cal-wd b { display: block; font-size: 19px; letter-spacing: -.02em; } .cal-wd small { color: var(--muted); font-size: 11px; }
.cal-wd.today b { color: var(--pick); } .cal-wd.closed { opacity: .55; }
.cal-wd.on { background: var(--ink); color: var(--surface); } .cal-wd.on span, .cal-wd.on small, .cal-wd.on b { color: inherit; } .cal-wd.on span, .cal-wd.on small { opacity: .75; }

.cal-now { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-card { flex: 1 1 200px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.cal-card > i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cal-card p { margin: 0; min-width: 0; } .cal-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cal-card b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-card.free { background: var(--pick-soft); box-shadow: none; } .cal-card.free b { color: var(--pick-text); white-space: normal; }

.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.cal-wrap.open { grid-template-columns: minmax(0, 1fr) 340px; }
.cal-grid { padding: 0; overflow: hidden; }
.cal-scroll { max-height: 70vh; overflow: auto; position: relative; }
.cal-cols { display: grid; position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); min-width: min-content; }
.cal-ch { display: flex; gap: 10px; align-items: center; padding: 12px 10px; border-left: 1px solid var(--line); min-width: 0; }
.cal-ch b { display: block; font-size: 14px; } .cal-ch span:not(.cal-av) { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-meter { display: block; height: 4px; margin-top: 5px; border-radius: 99px; background: var(--soft); overflow: hidden; } .cal-meter i { display: block; height: 100%; border-radius: 99px; }
.cal-body { display: grid; position: relative; min-width: min-content; }
.cal-times { position: relative; } .cal-times span.first { top: 4px; transform: none; } .cal-times span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.cal-lane { position: relative; border-left: 1px solid var(--line); }
.cal-hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); } .cal-hr.half { border-top-style: dashed; opacity: .6; }
.cal-shut { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, var(--soft) 0 5px, transparent 5px 10px); }
.cal-shut em { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-brk { position: absolute; left: 4px; right: 4px; border-radius: 8px; display: flex; align-items: center; padding: 0 10px; font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--soft) 0 5px, var(--surface) 5px 10px); box-shadow: inset 0 0 0 1px var(--line); }
.cal-b { position: absolute; left: 4px; right: 4px; display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 6px 9px; border: 0; border-radius: 8px; overflow: hidden;
  background: var(--c); color: #0d0d12; font: inherit; text-align: left; cursor: pointer; transition: transform .25s cubic-bezier(.32,.72,0,1), box-shadow .25s; }
.cal-b:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -12px rgba(0,0,0,.35); }
.cal-b:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cal-b.done { opacity: .5; } .cal-b.done:hover { opacity: .8; }
.cal-b.now { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #0d0d12; z-index: 2; }
.cal-b.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pick); z-index: 3; }
.cal-b b { font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-lbl { font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: rgba(13,13,18,.6); }
.cal-t { font-size: 12px; font-weight: 700; color: rgba(13,13,18,.72); } .cal-s { font-size: 12px; color: rgba(13,13,18,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-one { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 20px; } .cal-one .cal-t { white-space: nowrap; }
.cal-tags { position: absolute; right: 6px; bottom: 5px; display: flex; gap: 4px; } .cal-tag { padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.7); font-size: 11px; font-weight: 800; }
/* Dark mode: the light-mode pastels were far brighter than everything else; a deep tint with a coloured edge instead. */
:root[data-theme="dark"] .cal-b { background: color-mix(in srgb, var(--c) 32%, var(--surface)); color: var(--ink); box-shadow: inset 3px 0 0 var(--c); }
:root[data-theme="dark"] .cal-b.now { box-shadow: inset 3px 0 0 var(--c), 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
:root[data-theme="dark"] .cal-b.sel { box-shadow: inset 3px 0 0 var(--c), 0 0 0 2px var(--surface), 0 0 0 4px var(--pick); }
:root[data-theme="dark"] .cal-lbl, :root[data-theme="dark"] .cal-t, :root[data-theme="dark"] .cal-s { color: color-mix(in srgb, var(--ink) 72%, transparent); }
:root[data-theme="dark"] .cal-tag { background: rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .cal-mk.now { background: var(--ink); color: var(--surface); }
.cal-mk { align-self: flex-start; margin-top: 2px; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 800; } .cal-mk.now { background: #0d0d12; color: #fff; }
.cal-one .cal-mk { margin: 0; }
.cal-nowline { position: absolute; left: 56px; right: 0; border-top: 2px solid #d33; z-index: 3; pointer-events: none; }
.cal-nowline::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #d33; }
.cal-nowtag { position: absolute; right: 6px; transform: translateY(-50%); padding: 1px 6px; border-radius: 99px; background: #d33; color: #fff; font-size: 10.5px; font-weight: 800; z-index: 3; }
.cal-empty { margin: 0; padding: 10px 14px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.cal-key { display: flex; gap: 6px 14px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.cal-key i { display: inline-block; width: 18px; height: 11px; border-radius: 4px; vertical-align: -1px; margin-right: 6px; }
.cal-key .cal-key-shut { background: repeating-linear-gradient(135deg, #bbb 0 3px, transparent 3px 6px); }

.cal-details { position: sticky; top: 16px; padding: 18px 20px 20px; max-height: calc(100vh - 32px); overflow-y: auto; }
.cal-x { float: right; margin: -4px -6px 0 0; }
.cal-details h3 { margin: 0 0 2px; font-size: 18px; } .cal-when { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.cal-who { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--soft); margin-bottom: 12px; }
.cal-who b { display: block; font-size: 15px; } .cal-who span:not(.cal-av):not(.cal-mk) { color: var(--muted); font-size: 12.5px; }
.cal-contact { display: flex; gap: 6px; margin-bottom: 12px; }
.cal-contact a { flex: 1; display: grid; place-items: center; height: 36px; border-radius: 99px; border: 1px solid var(--line); font-weight: 700; font-size: 12.5px; color: var(--ink); text-decoration: none; }
.cal-contact a:hover { background: var(--soft); }
.cal-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff8e6; color: #6b4a00; font-size: 13px; }
.cal-rows { margin: 0 0 12px; } .cal-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.cal-rows div:first-child { border-top: 0; } .cal-rows dt { color: var(--muted); } .cal-rows dd { margin: 0; font-weight: 700; text-align: right; }
.cal-lab { margin: 4px 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cal-texts { list-style: none; margin: 0 0 12px; padding: 0; font-size: 12.5px; color: var(--muted); } .cal-texts li { padding: 6px 0; border-top: 1px dashed var(--line); } .cal-texts b { color: var(--ink); font-weight: 600; }
.cal-acts { display: flex; gap: 8px; }
.cal-details .compose { margin-top: 12px; }

@media (max-width: 1000px) {
  .cal-wrap.open { grid-template-columns: minmax(0, 1fr); }
  .cal-details { position: fixed; inset: auto 0 0 0; top: auto; max-height: 80vh; border-radius: 22px 22px 0 0; z-index: 30; box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
}
@media (max-width: 700px) {
  .cal-week { gap: 4px; } .cal-wd { padding: 6px 2px; } .cal-wd small { display: none; }
  .cal-scroll { max-height: 64vh; }
}
@media (prefers-reduced-motion: reduce) { .cal-b { transition: none; } }

/* + New booking, and a tap on an empty time (those allowed to add bookings) */
.cal-new { margin-left: 4px; }
.cal-lane.can-add { cursor: copy; }
.cal-lane.can-add:hover { background: color-mix(in srgb, var(--pick, #0276df) 4%, transparent); }

/* The "New booking" side panel (add-booking.js) */
.ab-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(13, 13, 18, .3); opacity: 0; transition: opacity .3s; }
.ab-sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(520px, 100%); display: flex; flex-direction: column; background: var(--surface); box-shadow: -20px 0 60px -30px rgba(13, 13, 18, .45); transform: translateX(100%); transition: transform .4s cubic-bezier(.32,.72,0,1); }
.ab-root.open .ab-scrim { opacity: 1; } .ab-root.open .ab-sheet { transform: none; }
.ab-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.ab-head h2 { flex: 1; margin: 0; font-size: 20px; letter-spacing: -.02em; }
.ab-body { flex: 1; overflow: auto; padding: 4px 24px 24px; }
.ab-step { padding: 18px 0; border-bottom: 1px solid var(--line); } .ab-step:last-child { border-bottom: 0; }
.ab-step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 14.5px; }
.ab-step h3 i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pick-soft); color: var(--pick-text); font-style: normal; font-size: 12px; }
.ab-step h3 .opt { font-weight: 500; }
.ab-results { margin-top: 8px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.ab-res { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ab-res + .ab-res { border-top: 1px solid var(--line); } .ab-res:hover { background: var(--soft); }
.ab-av { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--soft); color: #0d0d12; font-weight: 800; font-size: 12px; } /* the customer's own colour (customerColour) */
.ab-res-text { flex: 1; min-width: 0; } .ab-res-text b { display: block; font-size: 13.5px; } .ab-res-text span { font-size: 12px; color: var(--muted); }
.ab-last { font-size: 11.5px; color: var(--muted); text-align: right; }
.ab-add .ab-av { background: var(--pick-soft); color: var(--pick-text); font-size: 16px; } .ab-add b { color: var(--pick-text); }
.ab-picked { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--pick-soft); }
 .ab-picked div { flex: 1; min-width: 0; } .ab-picked b { display: block; } .ab-picked span { font-size: 12.5px; color: var(--muted); }
.ab-new { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .ab-wide { grid-column: 1 / -1; } .ab-new .field { margin: 0; }
.ab-new-acts { display: flex; gap: 8px; } .ab-new-err { margin: 0; }
.ab-group { margin: 10px 0 6px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } .ab-group:first-child { margin-top: 0; }
.ab-svcs { display: grid; gap: 6px; }
.ab-svc { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ab-svc i { width: 10px; height: 10px; flex: none; border-radius: 3px; } .ab-svc b { flex: 1; } .ab-svc span { color: var(--muted); font-size: 12.5px; } .ab-svc em { font-style: normal; font-weight: 800; margin-left: 8px; }
.ab-svc[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pick); background: var(--pick-soft); }
.ab-who { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border: 0; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; font-weight: 700; font-size: 13px; color: inherit; cursor: pointer; }
.ab-chip .pic { width: 28px; height: 28px; box-shadow: none; } .ab-any { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); }
.ab-chip:disabled { opacity: .45; cursor: not-allowed; }
.ab-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pick); background: var(--pick-soft); color: var(--pick-text); }
.ab-day { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .ab-day b { flex: 1; }
.ab-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.ab-t { height: 36px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; font-weight: 700; font-size: 13px; color: inherit; cursor: pointer; }
.ab-t[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.ab-notify { display: grid; gap: 12px; }
.ab-tg { display: flex; align-items: center; gap: 12px; } .ab-tg div { flex: 1; } .ab-tg b { display: block; font-size: 13.5px; } .ab-tg span { font-size: 12px; color: var(--muted); }
.ab-foot { padding: 14px 24px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.ab-err { margin: 0 0 8px; }
.ab-sum { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .ab-sum-text { flex: 1; font-size: 13px; color: var(--muted); } .ab-price { font-size: 20px; }
.ab-acts { display: flex; gap: 8px; } .ab-acts .btn { flex: 1; justify-content: center; }
@media (max-width: 600px) { .ab-new { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ab-sheet, .ab-scrim { transition: none; } }
