/* Aloha Nails booking page. Brand colors come from the main site (#8c221d red, #EBA33D gold). */
:root {
  --brand: #8c221d;
  --brand-dark: #6c1814;
  --brand-tint: #f8ecea;
  --gold: #eba33d;
  --bg: #faf7f3;
  --card: #ffffff;
  --text: #2b2522;
  --muted: #776c66;
  --line: #e9e1d8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(43, 37, 34, .06), 0 4px 16px rgba(43, 37, 34, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Open Sans", "Segoe UI", Arial, sans-serif;
}
h1, h2, h3 { font-family: Oswald, "Arial Narrow", Arial, sans-serif; font-weight: 500; letter-spacing: .01em; margin: 0; }
a { color: var(--brand); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h2:focus { outline: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 100px; gap: 12px; }
.brand { display: block; flex: none; }
.brand img { display: block; height: 84px; width: auto; }
@media (max-width: 480px) {
  .topbar-inner { min-height: 76px; }
  .brand img { height: 62px; }
}
.topbar-phone { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.topbar-phone::before { content: "\260E"; margin-right: 6px; opacity: .85; }

.intro { padding: 28px 0 8px; }
.intro h1 { font-size: 32px; color: var(--brand); }
.intro p { margin: 4px 0 0; color: var(--muted); }

/* Stepper */
.stepper { list-style: none; display: flex; gap: 8px; padding: 0; margin: 16px 0 20px; overflow-x: auto; }
.stepper button {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.stepper button:disabled { cursor: default; color: #b4aaa4; }
.stepper button.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .summary { position: sticky; top: 16px; }
}

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel h2 { font-size: 22px; margin-bottom: 16px; }

/* Services */
.search input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--bg); margin-bottom: 14px;
}
.cat { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.cat-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.cat-name { font-weight: 700; flex: 1; }
.cat-badge {
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px;
}
.chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; margin: 0 4px 4px; }
.cat-head[aria-expanded="true"] .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.cat-body { border-top: 1px solid var(--line); }

.svc { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-top: 1px solid var(--line); }
.svc:first-child { border-top: 0; }
.svc:hover { background: #fcf9f6; }
.svc input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 0; }
.svc-text { flex: 1; display: flex; flex-direction: column; }
.svc-name { font-weight: 600; }
.svc-meta { color: var(--muted); font-size: 13px; }
.svc-price { font-weight: 700; }
.svc:has(input:checked) { background: var(--brand-tint); }

/* Dates */
.dates { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.dates-strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px; scrollbar-width: none; flex: 1; }
.dates-strip::-webkit-scrollbar { display: none; }
.dates-nav { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 20px; line-height: 1; }
.date {
  flex: none; width: 64px; padding: 8px 0; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; display: flex; flex-direction: column; align-items: center; scroll-snap-align: start;
}
.date-wd, .date-mo { font-size: 12px; color: var(--muted); }
.date-num { font: 600 20px/1.2 Oswald, Arial, sans-serif; }
.date:disabled { cursor: default; opacity: .45; background: transparent; }
.date[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.date[aria-selected="true"] .date-wd, .date[aria-selected="true"] .date-mo { color: rgba(255, 255, 255, .85); }

/* Times */
.slot-group { font-size: 15px; color: var(--muted); margin: 14px 0 8px; font-family: "Open Sans", Arial, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.slot-group:first-child { margin-top: 0; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { padding: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; font-weight: 600; }
.slot:hover { border-color: var(--brand); }
.slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.loading, .empty { color: var(--muted); margin: 8px 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Details form */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; }
.optional { font-weight: 400; color: var(--muted); font-size: 13px; }
.field input, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-tint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #fdecea; color: #8a1c13; border-radius: 8px; padding: 10px 12px; }
.fineprint { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 0 0; }

/* Buttons */
.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 13px 20px; font-weight: 700;
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #cdbfb9; cursor: default; }
.btn-secondary { background: var(--brand-tint); color: var(--brand); }

/* Summary */
.summary { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.summary-title { font-size: 18px; margin-bottom: 10px; }
.summary-list { list-style: none; padding: 0; margin: 0 0 10px; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.summary-price { font-weight: 600; white-space: nowrap; }
.summary-when { font-weight: 700; color: var(--brand); margin: 6px 0 10px; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.summary-total strong { color: var(--text); font-size: 18px; }

/* Phone: the summary becomes a bar stuck to the bottom of the screen. */
@media (max-width: 899px) {
  body { padding-bottom: 120px; }
  .summary {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; border-radius: 16px 16px 0 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
    box-shadow: 0 -4px 20px rgba(43, 37, 34, .12);
  }
  .summary-title, .summary-list { display: none; }
  .summary-when { margin: 0; grid-column: 1; font-size: 14px; }
  .summary-total { margin: 0; grid-column: 1; flex-direction: column; align-items: flex-start; gap: 0; }
  .summary .btn { grid-column: 2; grid-row: 1 / span 2; width: auto; }
  .intro h1 { font-size: 26px; }
  .panel { padding: 16px; }
}

/* Done */
.done { text-align: center; padding: 32px 20px; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 34px; display: grid; place-items: center; margin: 0 auto 14px; }
.done h2 { font-size: 26px; margin-bottom: 6px; }
.done-summary { background: var(--bg); border-radius: 10px; padding: 14px 18px; margin: 18px auto; max-width: 420px; text-align: left; }
.done-summary ul { margin: 6px 0; padding-left: 20px; }
.done-when { font-weight: 700; margin: 0; }
.done-total { color: var(--muted); margin: 0; }
.done-ref { color: var(--muted); }
.notice { background: #fff7e6; padding: 12px 16px; border-radius: 8px; }

/* ---- Inspiration photos (step 3) ---- */
.field-hint { margin: -2px 0 8px; color: var(--muted); font-size: 13px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 18px; line-height: 30px; cursor: pointer; padding: 0;
}
.photo-add {
  aspect-ratio: 1; border: 2px dashed #d9c9bb; border-radius: 12px; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--brand); font-weight: 700; font-size: 13px; cursor: pointer; text-align: center; padding: 6px;
}
.photo-add:hover { border-color: var(--brand); }
.photo-add-icon { font-size: 26px; line-height: 1; }
.photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-busy { opacity: .6; pointer-events: none; }
.photo-error { color: #8a1c13; font-size: 14px; margin: 8px 0 0; }

/* Booking link on the "done" screen */
.done-link { margin: 6px 0 18px; }
.done-link .btn { margin: 4px; }
.done-link p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* ---- Customer's booking page (manage.php) ---- */
.manage { padding-top: 24px; padding-bottom: 40px; max-width: 640px; }
.manage-card h1 { font-size: 30px; color: var(--brand); margin: 10px 0 2px; }
.manage-sub { color: var(--muted); margin: 0 0 18px; }
.status-pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 11px; border-radius: 999px; background: var(--line); }
.status-pill-pending { background: #fdf0d9; color: #8a5400; }
.status-pill-confirmed { background: #e3f3e8; color: #1f6b38; }
.status-pill-completed { background: #e6eefb; color: #24508f; }
.status-pill-cancelled, .status-pill-declined, .status-pill-no_show { background: #f2e6e4; color: #7a2a22; }
.manage-when { background: var(--brand); color: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; }
.manage-when strong { display: block; font: 600 22px/1.2 Oswald, Arial, sans-serif; }
.manage-when span { opacity: .9; }
.status-cancelled .manage-when, .status-declined .manage-when { background: #9a8f89; }
.manage-message { background: #fbf6ee; border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; padding: 10px 14px; margin-bottom: 16px; }
.manage-message span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.manage-items { list-style: none; margin: 0 0 18px; padding: 0; }
.manage-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.manage-items li span:last-child { white-space: nowrap; color: var(--muted); }
.manage-items .manage-total { font-weight: 700; border-bottom: 0; }
.manage-items .manage-total span:last-child { color: var(--text); }
.manage-h2 { font-size: 17px; margin: 0 0 8px; }
.manage-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.manage-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.manage-notes { background: var(--bg); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; }
.manage-ref { color: var(--muted); font-size: 14px; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.manage-actions .btn { flex: 1 1 200px; }
.manage-cancel { border-top: 1px solid var(--line); padding-top: 14px; }
.manage-cancel summary { cursor: pointer; color: #8a1c13; font-weight: 700; }
.manage-cancel form { margin-top: 10px; background: #fdf3f2; border-radius: 10px; padding: 12px 14px; }
.manage-cancel p { margin: 0 0 10px; }
.btn-danger { background: #a3241b; color: #fff; }
.btn-danger:hover { background: #7f1b14; }
.notice-ok { background: #e7f4ea; color: #1f5c2e; padding: 10px 14px; border-radius: 8px; }
.manage-card .form-error { margin-bottom: 12px; }

/* Booked-up times: shown, but greyed out and not selectable */
.slot { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; min-height: 44px; }
.slot.is-full { background: #f3efeb; border-color: #ece5de; color: #b5aaa3; cursor: not-allowed; }
.slot.is-full .slot-time { text-decoration: line-through; text-decoration-color: rgba(181, 170, 163, .7); }
.slot.is-full:hover { border-color: #ece5de; }
.slot-full { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; display: inline-block; color: #a0948d; }

/* Check-in QR code on the customer's booking page */
.checkin-code { display: flex; align-items: center; gap: 16px; border: 2px dashed #e0cfc0; border-radius: 14px; padding: 14px; margin-bottom: 18px; background: #fff; }
.checkin-qr { flex: none; width: 150px; height: 150px; background: #fff; }
.checkin-qr svg { width: 100%; height: 100%; display: block; }
.checkin-code-text { display: flex; flex-direction: column; gap: 4px; }
.checkin-code-text strong { font: 600 19px/1.2 Oswald, Arial, sans-serif; color: var(--brand); }
.checkin-code-text span { color: var(--muted); font-size: 14px; }
.checkin-code-text .checkin-ref { font: 600 22px/1.2 Oswald, Arial, sans-serif; color: var(--text); letter-spacing: .06em; margin-top: 4px; }
@media (max-width: 420px) {
  .checkin-code { flex-direction: column; text-align: center; }
  .checkin-qr { width: 200px; height: 200px; }
}
