/* ===========================================================
   ElitePC — Scheduling / Booking section · DARK
   Availability: green = open (0) · yellow = 1 booking ·
   orange = 2+ bookings. Same class names as schedule.js.
   =========================================================== */

:root{
  --av-open:   #33C277;   /* green  · 0 bookings */
  --av-busy:   #E8C84B;   /* yellow · 1 booking  */
  --av-full:   #E8853A;   /* orange · 2+ bookings */
}

.booking .shead{ margin-bottom:clamp(34px,4vw,52px); }

.bk{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,0.95fr);
  gap:clamp(20px,2.4vw,34px);
  align-items:start;
}

/* ---------- shared card chrome ---------- */
.bk-cal, .bk-panel{
  background:var(--glass);
  border:1px solid var(--line);
  border-radius:8px;
  padding:clamp(20px,2.2vw,30px);
  backdrop-filter:blur(8px);
  box-shadow:var(--shadow);
}
.bk-panel{ min-height:360px; position:relative; overflow:hidden; }

/* ---------- calendar ---------- */
.bk-cal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:18px; flex-wrap:wrap; margin-bottom:18px; }
.bk-month{ font-family:var(--serif); font-size:clamp(22px,2.4vw,28px); font-weight:500; line-height:1; letter-spacing:-.01em; color:var(--ink); }
.bk-nav{ display:flex; gap:8px; }
.bk-nav button{ width:34px; height:34px; border-radius:50%; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); transition:all .25s var(--ease); }
.bk-nav button:hover:not(:disabled){ border-color:var(--teal); color:var(--ink); box-shadow:var(--glow); }
.bk-nav button:disabled{ opacity:.3; cursor:not-allowed; }
.bk-nav button svg{ width:15px; height:15px; }

.bk-legend{
  display:flex; gap:14px; flex-wrap:wrap;
  font-family:var(--mono); font-size:10.5px; letter-spacing:.04em;
  text-transform:uppercase; color:var(--ink-faint);
}
.bk-legend span{ display:inline-flex; align-items:center; gap:6px; }
.bk-legend i{ width:11px; height:11px; border-radius:50%; border:1px solid var(--line); flex:0 0 auto; }
.bk-legend i.open{ background:var(--av-open); border-color:var(--av-open); box-shadow:0 0 6px rgba(51,194,119,.5); }
.bk-legend i.busy{ background:var(--av-busy); border-color:var(--av-busy); box-shadow:0 0 6px rgba(232,200,75,.5); }
.bk-legend i.full{ background:var(--av-full); border-color:var(--av-full); box-shadow:0 0 6px rgba(232,133,58,.5); }
.bk-legend i.closed{ border-radius:3px; background:repeating-linear-gradient(135deg,rgba(255,255,255,.10) 0 4px,transparent 4px 8px); }

.bk-dow{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; font-family:var(--mono); font-size:10.5px; letter-spacing:.08em; color:var(--ink-faint); text-align:center; margin-bottom:8px; }
.bk-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }

.bk-day{
  position:relative; aspect-ratio:1/1; border-radius:6px;
  border:1px solid var(--line); background:rgba(255,255,255,.022);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; font-family:var(--sans); font-size:15px; color:var(--ink);
  transition:transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.bk-day .d-load{ width:7px; height:7px; border-radius:50%; background:transparent; }
.bk-day.is-open{ cursor:pointer; }
.bk-day.is-open:hover{ border-color:var(--teal); transform:translateY(-2px); box-shadow:0 10px 26px -14px var(--teal-glow), inset 0 0 0 1px var(--teal-line); }

/* availability indicators */
.bk-day.open  .d-load{ background:var(--av-open); box-shadow:0 0 6px rgba(51,194,119,.6); }
.bk-day.busy  .d-load{ background:var(--av-busy); box-shadow:0 0 6px rgba(232,200,75,.6); }
.bk-day.full  .d-load{ background:var(--av-full); box-shadow:0 0 7px rgba(232,133,58,.7); }
.bk-day.open  { background:rgba(51,194,119,.045); }
.bk-day.busy  { background:rgba(232,200,75,.05); }
.bk-day.full  { background:rgba(232,133,58,.06); }

.bk-day.is-blank{ border-color:transparent; background:transparent; pointer-events:none; }
.bk-day.is-out, .bk-day.is-past{ color:var(--ink-faint); background:transparent; border-color:var(--line-soft); }
.bk-day.is-closed{ color:var(--ink-faint); cursor:not-allowed; background:repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 5px, transparent 5px 10px); }
.bk-day.is-holiday::after{ content:""; position:absolute; top:6px; right:6px; width:5px; height:5px; border-radius:50%; background:var(--teal-bright); box-shadow:0 0 6px var(--teal-glow); }
.bk-day.is-limit{ cursor:pointer; color:var(--ink-faint); }
.bk-day.is-limit .d-lock{ position:absolute; bottom:7px; opacity:.5; }
.bk-day.is-limit .d-lock svg{ width:11px; height:11px; }
.bk-day.is-selected{ border-color:var(--teal); background:var(--teal); color:#04282b; transform:none; font-weight:600; box-shadow:0 12px 30px -12px var(--teal-glow), 0 0 0 1px var(--teal); }
.bk-day.is-selected .d-load{ background:#04282b !important; box-shadow:none; }
.bk-day .d-num{ line-height:1; }

.bk-hint{ margin-top:14px; font-family:var(--mono); font-size:11px; letter-spacing:.03em; color:var(--ink-faint); transition:color .2s var(--ease); }
.bk-hint.warn{ color:var(--av-full); }
.bk-hint.shake{ animation:bkShake .4s var(--ease); }
@keyframes bkShake{ 0%,100%{transform:translateX(0)} 20%{transform:translateX(-5px)} 40%{transform:translateX(5px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(3px)} }
@media (prefers-reduced-motion: reduce){ .bk-hint.shake{ animation:none; } }

/* ---------- panel: empty state ---------- */
.bk-empty{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; text-align:center; padding:30px; color:var(--ink-faint); }
.bk-empty svg{ width:34px; height:34px; stroke:var(--teal); opacity:.6; }
.bk-empty p{ font-family:var(--mono); font-size:11px; letter-spacing:.18em; text-transform:uppercase; }

/* ---------- panel: form ---------- */
.bk-form{ display:flex; flex-direction:column; gap:22px; }
.bk-when{ display:flex; align-items:center; gap:12px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.bk-when .w-date{ font-family:var(--serif); font-size:clamp(21px,2.3vw,26px); font-weight:500; line-height:1.05; color:var(--ink); }
.bk-when .w-tag{ margin-left:auto; font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; padding:5px 10px; border-radius:999px; border:1px solid rgba(51,194,119,.4); color:var(--av-open); background:rgba(51,194,119,.08); white-space:nowrap; }
.bk-when .w-tag.busy{ color:var(--av-busy); border-color:rgba(232,200,75,.4); background:rgba(232,200,75,.08); }
.bk-when .w-tag.full{ color:#F0A062; border-color:rgba(232,133,58,.4); background:rgba(232,133,58,.08); }
.bk-when .w-tag.holiday{ color:var(--teal); border-color:var(--teal-line); background:var(--teal-wash); }

.bk-field > .lbl{ display:block; font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-faint); margin-bottom:11px; }
.bk-field > .lbl .req{ color:var(--teal); }

/* services */
.svc-group{ display:flex; flex-direction:column; gap:7px; }
.svc-cat{ font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); margin:10px 0 2px; }
.svc-cat:first-child{ margin-top:0; }
.svc-opt{ display:flex; align-items:center; gap:12px; padding:11px 13px; border:1px solid var(--line); border-radius:6px; cursor:pointer; transition:all .18s var(--ease); user-select:none; background:rgba(255,255,255,.018); }
.svc-opt:hover{ border-color:var(--teal-line); background:var(--teal-wash); }
.svc-opt.on{ border-color:var(--teal); background:var(--teal-wash); box-shadow:inset 0 0 0 1px var(--teal-line); }
.svc-opt input{ position:absolute; opacity:0; width:0; height:0; }
.svc-box{ width:18px; height:18px; border-radius:5px; border:1.5px solid var(--ink-faint); flex:0 0 auto; display:flex; align-items:center; justify-content:center; transition:all .18s var(--ease); }
.svc-opt.on .svc-box{ background:var(--teal); border-color:var(--teal); }
.svc-box svg{ width:11px; height:11px; stroke:#04282b; opacity:0; transition:opacity .15s; }
.svc-opt.on .svc-box svg{ opacity:1; }
.svc-name{ font-size:15px; flex:1 1 auto; color:var(--ink); }
.svc-name small{ display:block; color:var(--ink-faint); font-size:12px; margin-top:1px; }
.svc-price{ font-family:var(--mono); font-size:13px; color:var(--teal); white-space:nowrap; }

/* addon */
.bk-addon{ display:flex; align-items:flex-start; gap:11px; padding:13px; border:1px dashed var(--teal-line); border-radius:6px; background:var(--teal-wash); cursor:pointer; }
.bk-addon input{ margin-top:3px; accent-color:var(--teal); width:16px; height:16px; flex:0 0 auto; }
.bk-addon .ad-t{ font-size:14px; color:var(--ink); }
.bk-addon .ad-t small{ display:block; color:var(--ink-soft); font-size:12.5px; margin-top:2px; }

/* inputs */
.bk-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.bk-input{ display:flex; flex-direction:column; gap:8px; }
.bk-input label{ font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-faint); }
.bk-input label .req{ color:var(--teal); }
.bk-input input, .bk-input select{ height:46px; border:1px solid var(--line); border-radius:6px; background:rgba(0,0,0,.25); padding:0 14px; font-family:var(--sans); font-size:15px; color:var(--ink); transition:border-color .18s var(--ease), box-shadow .18s var(--ease); width:100%; }
.bk-input input:focus, .bk-input select:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px var(--teal-wash); }
.bk-input input::placeholder{ color:var(--ink-faint); }
.bk-input.err input, .bk-input.err select{ border-color:var(--av-full); box-shadow:0 0 0 3px rgba(232,133,58,.14); }
.bk-laptop[hidden]{ display:none; }

/* total + submit */
.bk-total{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding-top:18px; border-top:1px solid var(--line); }
.bk-total .t-l{ font-family:var(--mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-faint); }
.bk-total .t-v{ font-family:var(--serif); font-size:clamp(26px,3vw,34px); font-weight:500; color:var(--ink); }
.bk-total .t-v small{ font-size:.5em; color:var(--ink-faint); font-family:var(--mono); letter-spacing:.04em; margin-left:6px; }
.bk-submit{ width:100%; height:54px; border-radius:8px; background:var(--teal); color:#04282b; font-family:var(--sans); font-weight:700; font-size:15px; letter-spacing:.01em; display:flex; align-items:center; justify-content:center; gap:9px; transition:all .2s var(--ease); box-shadow:0 14px 36px -16px var(--teal-glow); }
.bk-submit:hover{ background:var(--teal-bright); box-shadow:0 18px 44px -14px var(--teal-glow); }
.bk-submit:disabled{ opacity:.45; cursor:not-allowed; box-shadow:none; }
.bk-submit svg{ width:16px; height:16px; }
.bk-formnote{ font-family:var(--mono); font-size:11px; color:var(--ink-faint); line-height:1.5; text-align:center; }

/* ===========================================================
   CONFIRMATION TICKET
   =========================================================== */
.bk-ticket-wrap{ display:flex; flex-direction:column; gap:14px; }
.bk-ticket{
  position:relative; background:linear-gradient(180deg, var(--bg-card), #0B1011);
  border:1px solid var(--line); border-radius:14px; padding:22px 22px 20px;
  box-shadow:var(--shadow); overflow:hidden;
  animation:tkIn .5s var(--ease) both;
}
@keyframes tkIn{ from{ opacity:0; transform:translateY(14px) scale(.98); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){ .bk-ticket{ animation:none; } }
.bk-ticket::before{ content:""; position:absolute; left:0; right:0; top:0; height:3px; background:linear-gradient(90deg, var(--teal), var(--teal-bright) 40%, transparent); }

.tk-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.tk-brand{ display:flex; align-items:center; gap:10px; }
.tk-brand img{ height:19px; filter:brightness(0) invert(1); }
.tk-brand span{ font-family:var(--mono); font-size:10px; letter-spacing:.18em; text-transform:uppercase; color:var(--ink-faint); }
.tk-status{ font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--av-busy); border:1px solid rgba(232,200,75,.4); background:rgba(232,200,75,.1); padding:5px 11px; border-radius:999px; }

.tk-when{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.tk-date{ font-family:var(--serif); font-size:clamp(23px,3vw,30px); line-height:1.04; color:var(--ink); }
.tk-date b{ display:block; font-weight:500; }
.tk-time{ text-align:right; font-family:var(--serif); font-size:21px; color:var(--ink); white-space:nowrap; }
.tk-time .tk-k{ display:block; font-family:var(--mono); font-size:9px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-faint); margin-bottom:3px; }

.tk-perf{ position:relative; height:0; border-top:1px dashed var(--line-strong); margin:18px -22px; }
.tk-perf::before, .tk-perf::after{ content:""; position:absolute; top:-10px; width:20px; height:20px; border-radius:50%; background:var(--bg); border:1px solid var(--line); }
.tk-perf::before{ left:-10px; } .tk-perf::after{ right:-10px; }

.tk-rows{ display:flex; flex-direction:column; gap:9px; }
.tk-row{ display:flex; gap:14px; font-size:14px; align-items:baseline; }
.tk-row .k{ font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-faint); min-width:76px; flex:0 0 auto; padding-top:1px; }
.tk-row .v{ color:var(--ink); flex:1; }
.tk-row.tk-total{ margin-top:5px; padding-top:11px; border-top:1px solid var(--line-soft); }
.tk-row.tk-total .v{ font-family:var(--serif); font-size:21px; color:var(--teal); }

.tk-note{ display:flex; align-items:flex-start; gap:11px; margin-top:6px; padding:13px 15px; border-radius:9px; background:var(--teal-wash); border:1px solid var(--teal-line); font-size:13.5px; color:var(--ink); line-height:1.45; }
.tk-note svg{ width:21px; height:21px; flex:0 0 auto; color:var(--teal); margin-top:1px; }
.tk-note b{ color:#fff; font-weight:600; }

/* actions under the ticket */
.act-msgr{ display:flex; align-items:center; justify-content:center; gap:10px; height:54px; border-radius:10px; background:var(--teal); color:#04282b; font-family:var(--sans); font-weight:700; font-size:15px; box-shadow:0 14px 36px -16px var(--teal-glow); transition:all .2s var(--ease); }
.act-msgr:hover{ background:var(--teal-bright); box-shadow:0 18px 44px -14px var(--teal-glow); }
.act-msgr svg{ width:19px; height:19px; }
.tk-actions{ display:flex; gap:12px; flex-wrap:wrap; }
.tk-actions .done-copy, .tk-actions .act-gcal{ flex:1 1 auto; min-width:150px; height:48px; display:flex; align-items:center; justify-content:center; gap:8px; border-radius:8px; border:1px solid var(--line-strong); color:var(--ink); background:transparent; font-family:var(--sans); font-size:13px; transition:all .2s var(--ease); cursor:pointer; }
.tk-actions .done-copy:hover, .tk-actions .act-gcal:hover{ border-color:var(--teal); color:#fff; box-shadow:var(--glow); }
.tk-actions .done-copy.ok{ color:var(--teal); border-color:var(--teal-line); background:var(--teal-wash); }
.tk-actions .act-gcal svg{ width:16px; height:16px; }
.bk-again{ font-family:var(--mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); align-self:flex-start; background:none; }
.bk-again:hover{ color:var(--teal); }
#bkMsg[hidden]{ display:none; }
.tk-fineprint{ font-size:12px; line-height:1.5; color:var(--ink-faint); text-align:center; padding:0 6px; margin-top:-2px; }
.tk-fineprint b{ color:var(--ink-soft); font-family:var(--mono); letter-spacing:.03em; }
.tk-fineprint a{ color:var(--teal); border-bottom:1px solid var(--teal-line); }

/* ===========================================================
   MANAGE BOOKING (view status / cancel)
   =========================================================== */
.bk-manage{ margin-top:clamp(28px,3.4vw,44px); padding-top:clamp(26px,3vw,36px); border-top:1px solid var(--line); }
.bm-head{ display:flex; flex-direction:column; gap:4px; margin-bottom:15px; }
.bm-title{ font-family:var(--serif); font-size:clamp(21px,2.4vw,28px); font-weight:500; color:var(--ink); }
.bm-sub{ font-size:14px; color:var(--ink-soft); max-width:60ch; }
.bm-form{ display:flex; gap:10px; flex-wrap:wrap; max-width:520px; }
.bm-form input{ flex:1 1 200px; height:50px; border:1px solid var(--line); border-radius:8px; background:rgba(0,0,0,.25); padding:0 15px; font-family:var(--mono); font-size:14px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink); transition:border-color .18s var(--ease), box-shadow .18s var(--ease); }
.bm-form input::placeholder{ color:var(--ink-faint); letter-spacing:.02em; }
.bm-form input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px var(--teal-wash); }
.bm-view{ height:50px; padding:0 24px; border-radius:8px; background:var(--teal); color:#04282b; font-family:var(--sans); font-weight:600; font-size:14px; white-space:nowrap; transition:all .2s var(--ease); }
.bm-view:hover{ background:var(--teal-bright); }
.bm-view:disabled{ opacity:.5; cursor:wait; }
.bm-result{ margin-top:16px; max-width:560px; }
.bm-empty{ font-size:14px; color:var(--ink-soft); padding:14px 16px; border:1px solid var(--line); border-radius:8px; background:var(--glass); }
.bm-empty b{ color:var(--ink); font-family:var(--mono); letter-spacing:.04em; }

.bm-card{ border:1px solid var(--line); border-radius:10px; padding:18px 18px 16px; background:var(--glass); display:flex; flex-direction:column; gap:14px; box-shadow:var(--shadow); }
.bm-card-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.bm-card-id{ font-family:var(--mono); font-size:15px; letter-spacing:.08em; color:var(--ink); }
.bm-card-date{ font-family:var(--serif); font-size:18px; color:var(--ink-soft); margin-top:3px; }
.bm-badge{ font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; padding:6px 12px; border-radius:999px; font-weight:500; white-space:nowrap; flex:0 0 auto; }
.bm-badge.st-pending{ color:var(--av-busy); border:1px solid rgba(232,200,75,.4); background:rgba(232,200,75,.1); }
.bm-badge.st-confirmed{ color:var(--av-open); border:1px solid rgba(51,194,119,.4); background:rgba(51,194,119,.1); }
.bm-badge.st-cancelled{ color:#F4868B; border:1px solid rgba(231,76,87,.4); background:rgba(231,76,87,.1); }
.bm-card-rows{ display:flex; flex-direction:column; gap:7px; border-top:1px solid var(--line-soft); padding-top:13px; }
.bm-r{ display:flex; gap:14px; font-size:14px; align-items:baseline; }
.bm-r span{ font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); min-width:74px; flex:0 0 auto; }
.bm-r b{ color:var(--ink); font-weight:500; flex:1; }
.bm-note{ font-size:12.5px; color:var(--ink-soft); line-height:1.45; padding:11px 13px; border-radius:8px; background:rgba(255,255,255,.025); border:1px solid var(--line-soft); }
.bm-note.ok{ color:var(--ink); border-color:var(--teal-line); background:var(--teal-wash); }
.bm-note b{ color:var(--ink); }
.bm-cancel{ height:46px; border-radius:8px; border:1px solid rgba(231,76,87,.5); color:#F4868B; background:rgba(231,76,87,.06); font-family:var(--sans); font-weight:600; font-size:14px; transition:all .2s var(--ease); }
.bm-cancel:hover{ background:rgba(231,76,87,.16); border-color:#E74C57; color:#fff; }
.bm-cancel:disabled{ opacity:.6; cursor:wait; }
@media (max-width:520px){ .bm-view{ flex:1 1 100%; } }

/* ---------- responsive ---------- */
@media (max-width:920px){
  .bk{ grid-template-columns:1fr; }
  .bk-panel{ min-height:0; }
  .bk-empty{ position:static; padding:48px 20px; }
}
@media (max-width:520px){
  .bk-row{ grid-template-columns:1fr; }
  .bk-legend{ width:100%; gap:10px 14px; }
  .bk-cal{ padding:14px 12px; }
  .bk-grid, .bk-dow{ gap:5px; }
  .bk-day{ aspect-ratio:auto; min-height:46px; font-size:14px; }
  .tk-actions .done-copy, .tk-actions .act-gcal{ min-width:0; flex:1 1 100%; }
}
