﻿:root {
  --fo-ink: #1c2430;
  --fo-muted: #4A8FA3;
  --fo-border: #D6E8EC;
  --fo-bg: #eef1f2;
  --fo-card: #ffffff;
  --fo-brand: #0085AE;
  --fo-brand-dark: #045C73;
  --fo-accent: #FF6B4A;
  --fo-accent-dark: #e0542e;
  --fo-green: #1f9d55;
  --fo-green-bg: #e8f8ee;
  --fo-red: #d6432f;
  --fo-red-bg: #fdeceb;
  --fo-grey-bg: #f1f7f8;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fo-ink);
  background: var(--fo-bg);
}

.hidden { display: none !important; }

/* ---------- PSYPLE wordmark ---------- */
.psyple-logo { display: flex; align-items: center; gap: 10px; }
.psyple-logo-center { justify-content: center; margin-bottom: 22px; }
.psyple-bar { width: 7px; height: 40px; border-radius: 6px; background: linear-gradient(var(--fo-brand), var(--fo-accent)); flex-shrink: 0; }
.psyple-main { font-size: 30px; font-weight: 900; letter-spacing: 0.5px; color: var(--fo-brand); line-height: 1; white-space: nowrap; }
.psyple-sub { margin-top: 4px; margin-left: 2px; font-size: 7px; font-weight: 600; letter-spacing: 0.3px; color: var(--fo-muted); white-space: nowrap; }

/* ---------- Login ---------- */
.fo-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0085AE 0%, #045C73 100%);
}
.fo-login-box {
  background: var(--fo-card);
  border-radius: 16px;
  padding: 40px 36px;
  width: min(360px, 90vw);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.fo-login-box .psyple-main { font-size: 30px; }
.fo-login-subtitle { margin-top: 4px; font-size: 14px; color: var(--fo-muted); text-transform: uppercase; letter-spacing: 1px; }
.fo-login-copy { margin: 20px 0; color: var(--fo-muted); font-size: 14px; }
.fo-login-error { background: var(--fo-red-bg); color: var(--fo-red); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.fo-google-button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--fo-border); border-radius: 8px; padding: 12px 16px;
  text-decoration: none; color: var(--fo-ink); font-weight: 600; font-size: 14px;
  transition: background .15s ease;
}
.fo-google-button:hover { background: var(--fo-grey-bg); }
.fo-google-mark {
  width: 22px; height: 22px; border-radius: 50%; background: var(--fo-brand);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}

/* ---------- App shell ---------- */
.fo-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--fo-card); border-bottom: 1px solid var(--fo-border);
  position: sticky; top: 0; z-index: 10;
}
.fo-header-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.fo-header-divider { width: 1px; height: 28px; background: var(--fo-border); flex-shrink: 0; }
.fo-header-desk { font-weight: 700; font-size: 14px; color: var(--fo-brand-dark); text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap; }
.fo-header-user { position: relative; flex-shrink: 0; margin-left: auto; }

.fo-tabs {
  display: flex; align-items: center; gap: 4px; background: var(--fo-grey-bg);
  border: 1px solid var(--fo-border); border-radius: 22px; padding: 3px;
  margin-left: auto;
}
.fo-tab-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; background: none; border: none;
  border-radius: 18px; padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--fo-muted); cursor: pointer;
  white-space: nowrap;
}
.fo-tab-btn:hover { color: var(--fo-brand-dark); }
.fo-tab-btn.active { background: var(--fo-card); color: var(--fo-brand-dark); box-shadow: 0 1px 3px rgba(4,92,115,0.15); }
.fo-unsent-badge {
  background: var(--fo-accent); color: #fff; border-radius: 10px; min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; padding: 0 5px;
}

.fo-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--fo-border);
  padding: 0; overflow: hidden; cursor: pointer; background: var(--fo-grey-bg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fo-avatar-btn:hover { border-color: var(--fo-brand); }
.fo-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fo-avatar-fallback { font-weight: 800; font-size: 14px; color: var(--fo-brand-dark); }

.fo-avatar-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 20;
  background: var(--fo-card); border: 1px solid var(--fo-border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(4,92,115,0.16); min-width: 180px; padding: 8px;
}
.fo-avatar-menu-name {
  font-weight: 700; font-size: 13.5px; color: var(--fo-ink); padding: 6px 8px 10px;
  border-bottom: 1px solid var(--fo-border); margin-bottom: 6px; word-break: break-word;
}
.fo-avatar-menu-logout {
  display: block; padding: 8px; border-radius: 6px; color: var(--fo-red);
  text-decoration: none; font-weight: 600; font-size: 13.5px;
}
.fo-avatar-menu-logout:hover { background: var(--fo-red-bg); }

.fo-avatar-menu-link {
  display: block; padding: 8px; border-radius: 6px; color: var(--fo-ink);
  text-decoration: none; font-weight: 600; font-size: 13.5px; margin-bottom: 2px;
}
.fo-avatar-menu-link:hover { background: var(--fo-grey-bg); }

@media (max-width: 560px) {
  .fo-header-divider, .fo-header-desk { display: none; }
  .psyple-main { font-size: 30px; }
  .fo-header { padding: 12px 14px; }

  /* Bottom navigation bar on mobile -- exact same pill/capsule look as the desktop
     header tabs: grey track with border, fully-rounded ends, 3px inner padding,
     and a white active-pill with the same box-shadow. Floats above the page
     content with a soft shadow and safe-area inset for notched devices. */
  .fo-tabs {
    position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 20;
    display: flex; gap: 4px; width: auto; margin-left: 0;
    background: var(--fo-grey-bg);
    border: 1px solid var(--fo-border);
    border-radius: 22px;
    padding: 3px 3px calc(3px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 4px 20px rgba(4,92,115,0.14), 0 1px 4px rgba(4,92,115,0.08);
  }
  .fo-tabs { gap: 2px; max-width: calc(100vw - 16px); box-sizing: border-box; overflow: hidden; }
  /* The buttons share the bar and may shrink below their text (min-width: 0), so a long label or a big badge never pushes the last
     tab off the edge; the label is cut with an ellipsis only on the very narrowest phones. */
  .fo-tab-btn {
    flex: 1 1 auto; min-width: 0; gap: 4px; padding: 9px 4px; font-size: 12.5px; font-weight: 700;
    border-radius: 18px; color: var(--fo-muted); overflow: hidden;
  }
  .fo-tab-btn .fo-unsent-badge { min-width: 16px; height: 16px; padding: 0 4px; font-size: 10.5px; flex-shrink: 0; }
  @media (max-width: 360px) { .fo-tab-btn { font-size: 12px; padding: 9px 3px; gap: 3px; } }
  .fo-tab-btn:hover { color: var(--fo-brand-dark); }
  .fo-tab-btn.active {
    background: var(--fo-card); color: var(--fo-brand-dark);
    box-shadow: 0 1px 3px rgba(4,92,115,0.15);
  }

  /* Room at the bottom of the page so content never sits under the floating pill. */
  .fo-main { padding-bottom: 80px; }
}

.fo-toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: var(--fo-ink); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 100; box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.fo-toast.fo-toast-error { background: var(--fo-red); }
.fo-toast.fo-toast-success { background: var(--fo-green); }

.fo-main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }

.card { background: var(--fo-card); border: 1px solid var(--fo-border); border-radius: var(--radius); }

.fo-controls {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  padding: 16px; margin-bottom: 18px;
}
.fo-field { display: flex; flex-direction: column; gap: 6px; }
.fo-field label { font-size: 12px; font-weight: 700; color: var(--fo-muted); text-transform: uppercase; letter-spacing: .4px; }
.fo-field select, .fo-field input {
  border: 1px solid var(--fo-border); border-radius: 8px; padding: 9px 10px; font-size: 14px;
  background: #fff; color: var(--fo-ink); font-family: inherit; width: 100%;
}
.fo-field select:focus, .fo-field input:focus { outline: 2px solid var(--fo-brand); outline-offset: 1px; }
.fo-fee-field .fo-fee { font-size: 20px; font-weight: 800; color: var(--fo-brand-dark); padding: 6px 0; }

.fo-body-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }

.fo-slots-panel { padding: 16px; min-width: 0; }
.fo-slots-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.fo-slots-header #fo-slots-title { font-weight: 700; font-size: 15px; }
.fo-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--fo-muted); }
.fo-legend-item { display: flex; align-items: center; gap: 5px; }
.fo-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.fo-dot-available { background: var(--fo-green); }
.fo-dot-booked { background: var(--fo-brand); }
.fo-dot-blocked { background: var(--fo-red); }
.fo-dot-unavailable { background: #c7ccd4; }

.fo-slots-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px;
}
.fo-empty { color: var(--fo-muted); font-size: 14px; padding: 20px; text-align: center; grid-column: 1 / -1; }

.fo-slot {
  position: relative;
  border-radius: 8px; padding: 10px 6px; text-align: center; font-size: 12.5px; font-weight: 600;
  cursor: default; user-select: none; border: 1px solid transparent; line-height: 1.3;
}
.fo-slot-available { background: var(--fo-green-bg); color: var(--fo-green); cursor: pointer; border-color: rgba(31,157,85,0.25); touch-action: manipulation; }
.fo-slot-available:hover { background: #d7f3e2; }
.fo-slot-available.fo-slot-selected { background: var(--fo-green); color: #fff; }
.fo-slot-booked { background: #e3f2f6; color: var(--fo-brand-dark); cursor: pointer; touch-action: manipulation; }
.fo-slot-booked:hover { background: #cfe9f0; }
.fo-slot-blocked { background: var(--fo-red-bg); color: var(--fo-red); }
.fo-slot-unavailable { background: var(--fo-grey-bg); color: #a7adb6; }
.fo-slot-name { display: block; font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.fo-booking-panel { padding: 16px; min-height: 200px; }

.fo-slot-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.fo-slot-summary-service { font-weight: 700; text-transform: capitalize; }
.fo-slot-summary-time { color: var(--fo-muted); font-size: 13px; }
.fo-link-btn {
  margin-left: auto; background: none; border: none; color: var(--fo-brand); cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 0;
}
.fo-link-btn:hover { text-decoration: underline; }

.fo-step-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 700; }

.fo-phone-input-wrap { display: flex; align-items: center; border: 1px solid var(--fo-border); border-radius: 8px; overflow: hidden; }
.fo-phone-prefix { padding: 9px 10px; background: var(--fo-grey-bg); color: var(--fo-muted); font-size: 14px; }
.fo-phone-input-wrap input { border: none; flex: 1; padding: 9px 10px; font-size: 14px; font-family: inherit; }
.fo-phone-input-wrap input:focus { outline: none; }

.fo-user-results { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.fo-user-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--fo-border); border-radius: 8px; padding: 10px 12px; cursor: pointer;
}
.fo-user-card:hover { border-color: var(--fo-brand); background: var(--fo-grey-bg); }
.fo-user-card-name { font-weight: 700; font-size: 14px; }
.fo-user-card-meta { font-size: 12px; color: var(--fo-muted); margin-top: 2px; }
.fo-user-card-arrow { color: var(--fo-brand); font-size: 16px; }

.fo-newuser-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px dashed var(--fo-brand); color: var(--fo-brand); border-radius: 8px;
  padding: 10px; margin-top: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px;
}
.fo-newuser-cta:hover { background: var(--fo-grey-bg); }

.fo-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.fo-field-wide { grid-column: 1 / -1; }

.fo-optional-toggle {
  display: flex; align-items: center; gap: 6px; background: none; border: none; padding: 0;
  margin: -6px 0 14px; color: var(--fo-muted); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.fo-optional-toggle:hover { color: var(--fo-brand); }
.fo-optional-toggle-icon {
  width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--fo-border);
  display: flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; flex-shrink: 0;
}

.fo-primary-btn {
  width: 100%; background: var(--fo-brand); color: #fff; border: none; border-radius: 8px;
  padding: 12px; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.fo-primary-btn:hover { background: var(--fo-brand-dark); }
.fo-primary-btn:disabled { background: #9fc4cf; cursor: not-allowed; }

.fo-danger-btn {
  width: 100%; background: #fff; color: var(--fo-red); border: 1px solid var(--fo-red); border-radius: 8px;
  padding: 12px; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.fo-danger-btn:hover { background: var(--fo-red-bg); }

.fo-danger-btn-solid {
  background: var(--fo-red); color: #fff; border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.fo-danger-btn-solid:hover { background: #b8382a; }
.fo-danger-btn-solid:disabled { background: #eba99e; cursor: not-allowed; }

.fo-cancel-confirm-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--fo-red-bg); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--fo-red); font-weight: 600;
}

.fo-status-row { display: flex; gap: 8px; }
.fo-status-row .fo-paid-badge, .fo-status-row .fo-consulted-badge { margin-bottom: 0; flex: 1 1 0; }

.fo-paid-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--fo-green-bg); color: var(--fo-green);
  border-radius: 8px; padding: 9px 14px; font-size: 13.5px; font-weight: 700; margin-bottom: 10px;
}

.fo-consulted-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: rgba(0,133,174,0.1); color: var(--fo-brand);
  border-radius: 8px; padding: 9px 14px; font-size: 13.5px; font-weight: 700; margin-bottom: 10px;
}

.fo-mark-paid-btn { margin-bottom: 10px; }

.fo-payment-lightbox-content { width: min(420px, 100%); }
.fo-payment-fee { font-size: 14px; color: var(--fo-muted); margin-bottom: 16px; }
.fo-payment-fee strong { color: var(--fo-brand-dark); font-size: 16px; }
.fo-payment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; text-align: left; }
.fo-payment-fields .fo-field label {
  display: block; min-height: 28px; cursor: pointer;
}
.fo-payment-fields .fo-field label:hover { color: var(--fo-brand); }
.fo-payment-hint { display: block; font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--fo-muted); margin-top: 1px; }
.fo-payment-remaining { font-size: 13px; font-weight: 700; color: var(--fo-muted); text-align: right; margin-bottom: 14px; }
.fo-payment-remaining.fo-payment-ok { color: var(--fo-green); }
.fo-payment-remaining.fo-payment-over { color: var(--fo-red); }

.fo-slot-paid-mark {
  position: absolute; top: 2px; right: 4px; font-size: 10px; font-weight: 800; color: var(--fo-green);
}

.fo-slot-tick-double { color: var(--fo-brand); letter-spacing: -3px; padding-right: 3px; }

.fo-discount-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.fo-discount-check input { width: 16px; height: 16px; accent-color: var(--fo-brand); cursor: pointer; }
#fo-confirm-discount-amount { color: var(--fo-green); font-weight: 700; }
.fo-confirm-fee .fo-fee-original { text-decoration: line-through; color: var(--fo-muted); font-weight: 500; margin-right: 6px; }

.fo-error { background: var(--fo-red-bg); color: var(--fo-red); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-top: 10px; }

.fo-confirm-card { border: 1px solid var(--fo-border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.fo-confirm-name { font-weight: 800; font-size: 16px; }
.fo-confirm-mobile { color: var(--fo-muted); font-size: 13px; margin-bottom: 10px; }
.fo-confirm-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; border-top: 1px dashed var(--fo-border); }
.fo-confirm-row:first-of-type { border-top: none; }
.fo-confirm-row span:first-child { color: var(--fo-muted); }
.fo-confirm-fee span { font-weight: 800; color: var(--fo-brand-dark); }

/* ---------- Booking confirmation lightbox ---------- */
.fo-lightbox {
  position: fixed; inset: 0; background: rgba(4,20,26,0.6); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.fo-lightbox-content {
  position: relative; background: var(--fo-card); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  width: min(360px, 100%); padding: 28px 24px 24px; text-align: center;
}
.fo-lightbox-close {
  position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: var(--fo-grey-bg); color: var(--fo-muted); font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.fo-lightbox-close:hover { background: var(--fo-border); color: var(--fo-ink); }
.fo-lightbox-tick {
  width: 56px; height: 56px; border-radius: 50%; background: var(--fo-green-bg); color: var(--fo-green);
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; margin: 4px auto 14px;
}
.fo-lightbox-title { font-weight: 800; font-size: 17px; margin-bottom: 14px; }
.fo-lightbox-detail { text-align: left; border: 1px solid var(--fo-border); border-radius: 10px; padding: 14px; margin-bottom: 18px; }
.fo-lightbox-detail .fo-confirm-name { font-weight: 800; font-size: 16px; }
.fo-lightbox-detail .fo-confirm-mobile { color: var(--fo-muted); font-size: 13px; margin-bottom: 10px; }
.fo-lightbox-detail .fo-confirm-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; border-top: 1px dashed var(--fo-border); }
.fo-lightbox-detail .fo-confirm-row:first-of-type { border-top: none; }
.fo-lightbox-detail .fo-confirm-row span:first-child { color: var(--fo-muted); }
.fo-lightbox-message-preview {
  white-space: pre-wrap; background: var(--fo-grey-bg); border-radius: 8px; padding: 10px 12px;
  font-size: 13px; margin-top: 4px; max-height: 200px; overflow-y: auto;
}

.fo-unsent-panel { padding: 16px; margin-bottom: 18px; }
.fo-unsent-panel:last-child { margin-bottom: 0; }
.fo-unsent-panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 800; font-size: 15px; margin-bottom: 14px;
}
.fo-unsent-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;
}
.fo-unsent-item { border: 1px solid var(--fo-border); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.fo-unsent-item:hover { border-color: var(--fo-brand); background: var(--fo-grey-bg); }
.fo-unsent-item-name { font-weight: 700; font-size: 14px; text-transform: uppercase; }
.fo-unsent-item-meta { font-size: 12px; color: var(--fo-muted); margin-top: 2px; }

.fo-leads-add-trigger {
  background: var(--fo-grey-bg); border: 1px solid var(--fo-border); color: var(--fo-brand-dark);
  border-radius: 16px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
.fo-leads-add-trigger:hover { border-color: var(--fo-brand); }
a.fo-leads-add-trigger { text-decoration: none; }

.fo-leads-textarea {
  width: 100%; border: 1px solid var(--fo-border); border-radius: 8px; padding: 10px 12px;
  font-size: 13.5px; font-family: inherit; color: var(--fo-ink); resize: vertical; min-height: 110px;
  margin-bottom: 14px; box-sizing: border-box;
}
.fo-leads-textarea:focus { outline: 2px solid var(--fo-brand); outline-offset: 1px; }

.fo-lead-item { border: 1px solid var(--fo-border); border-radius: 8px; padding: 12px 14px; transition: opacity 0.15s ease; }
/* Called within the last 6 hours — kept visible but faded, like review/'s sent rows */
.fo-lead-done { opacity: 0.35; }
.fo-lead-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.fo-lead-call-link { color: var(--fo-green); font-size: 13px; font-weight: 700; text-decoration: none; }
.fo-lead-call-link:hover { text-decoration: underline; }
.fo-lead-pref { color: var(--fo-brand-dark); font-weight: 700; }
.fo-lead-action-btn {
  background: none; border: none; color: var(--fo-brand); font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 0; font-family: inherit;
}
.fo-lead-action-btn:hover { text-decoration: underline; }
.fo-lead-note {
  margin-top: 6px; padding: 6px 9px; border-radius: 6px; background: var(--fo-grey-bg);
  font-size: 12.5px; line-height: 1.45em; color: var(--fo-ink); white-space: pre-wrap; overflow-wrap: anywhere;
}
.fo-lead-later-name { font-size: 13px; color: var(--fo-muted); margin: -6px 0 14px; text-transform: uppercase; }
.fo-lead-later-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fo-lead-later-option {
  background: var(--fo-grey-bg); border: 1px solid var(--fo-border); border-radius: 8px; padding: 14px 10px;
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--fo-ink); cursor: pointer; text-align: center;
}
.fo-lead-later-option span { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 500; color: var(--fo-muted); }
.fo-lead-later-option:hover { border-color: var(--fo-brand); }
.fo-lead-later-option:disabled { opacity: 0.5; cursor: default; }

.fo-whatsapp-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: #25D366; color: #fff; border: none; border-radius: 8px; padding: 12px;
  font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer; margin-bottom: 10px;
  box-sizing: border-box;
}
.fo-whatsapp-btn:hover { background: #1ebe59; }

.fo-lightbox-call-link {
  display: block; text-align: center; color: var(--fo-muted); font-size: 12.5px;
  font-weight: 600; text-decoration: none;
}
.fo-lightbox-call-link:hover { color: var(--fo-brand); text-decoration: underline; }

@media (max-width: 860px) {
  .fo-controls { grid-template-columns: 1fr 1fr; }
  .fo-body-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .fo-controls { grid-template-columns: 1fr; }
  .fo-form-grid { grid-template-columns: 1fr; }
}

/* ---------- FAQ page ---------- */
.faq-page-title { font-size: 20px; font-weight: 800; margin: 4px 0 14px; }

.faq-search-wrap { margin-bottom: 14px; }
.faq-search-input {
  width: 100%; border: 1px solid var(--fo-border); border-radius: 10px; padding: 11px 14px;
  font-size: 14px; font-family: inherit; color: var(--fo-ink); background: var(--fo-card);
}
.faq-search-input:focus { outline: 2px solid var(--fo-brand); outline-offset: 1px; }
.faq-search-input::-webkit-search-cancel-button { cursor: pointer; }
.faq-no-results { color: var(--fo-muted); font-size: 14px; text-align: center; padding: 24px; }

.faq-jumpnav {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; margin-bottom: 20px;
}
.faq-jumpnav a {
  color: var(--fo-brand-dark); background: var(--fo-grey-bg); border-radius: 20px;
  padding: 6px 14px; font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.faq-jumpnav a:hover { background: var(--fo-border); }

.faq-category { padding: 18px 20px; margin-bottom: 18px; scroll-margin-top: 16px; }
.faq-category-title {
  font-size: 15px; font-weight: 800; color: var(--fo-brand-dark); text-transform: uppercase;
  letter-spacing: 0.4px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--fo-border);
}

.faq-item { border-bottom: 1px solid var(--fo-border); padding: 4px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  cursor: pointer; font-weight: 700; font-size: 14px; padding: 10px 4px; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--fo-brand); font-size: 18px; font-weight: 700; flex-shrink: 0; }
.faq-item[open] summary::after { content: "âˆ’"; }
.faq-item p { margin: 0 4px 12px; font-size: 13.5px; line-height: 1.65em; color: var(--fo-ink); }
.faq-item p a { color: var(--fo-brand); }

.faq-highlight { background: var(--fo-green-bg); border: 1px solid rgba(31,157,85,0.25); border-radius: 8px; padding: 2px 4px; }
.faq-highlight summary { color: var(--fo-green); }

/* Subtle footer link from the FAQ to the owner-only Coding Logics page */
.faq-footer-link { text-align: center; margin: 4px 0 18px; font-size: 12px; }
.faq-footer-link a { color: var(--fo-muted); text-decoration: none; opacity: 0.75; }
.faq-footer-link a:hover { opacity: 1; text-decoration: underline; }

/* Coding Logics page */
.cl-main { max-width: 860px; }
.cl-intro { margin: -6px 0 14px; font-size: 14px; line-height: 1.6em; color: var(--fo-muted); }
.cl-section p, .cl-section li { font-size: 14px; line-height: 1.7em; color: var(--fo-ink); }
.cl-section p { margin: 0 0 12px; }
.cl-section p:last-child { margin-bottom: 0; }
.cl-section h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.cl-list { margin: 0 0 12px; padding-left: 20px; }
.cl-list li { margin-bottom: 6px; }
.cl-section code { font-size: 12.5px; background: var(--fo-border); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }

/* ---------- Address search (pincode / place), as in admin ---------- */
.fo-address-search { position: relative; }
.fo-address-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  background: var(--fo-card); border: 1px solid var(--fo-border); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(4, 92, 115, 0.14); overflow: hidden;
}
.fo-address-result {
  display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--fo-border);
  padding: 9px 12px; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--fo-ink);
  text-transform: capitalize; cursor: pointer;
}
.fo-address-result:last-child { border-bottom: none; }
.fo-address-result:hover { background: var(--fo-grey-bg); }
.fo-address-result span { display: block; font-size: 12px; font-weight: 500; color: var(--fo-muted); }

/* ---------- Profile completion inside the payment lightbox ---------- */
.fo-pay-profile {
  margin: 4px 0 16px; padding: 12px 14px; border: 1px solid #f3c9a8; border-radius: 8px; background: #fff6ef;
  text-align: left;
}
.fo-pay-profile-title { font-size: 13.5px; font-weight: 700; color: var(--fo-accent-dark); margin-bottom: 10px; }
.fo-optional-toggle-note { margin-left: 6px; font-size: 11.5px; font-weight: 500; color: var(--fo-muted); }
.fo-pay-profile .fo-form-grid { margin-bottom: 0; }
/* The profile fields can make it taller than a phone screen — scroll inside it */
.fo-payment-lightbox-content { max-height: calc(100vh - 40px); overflow-y: auto; }
.fo-followup-count { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--fo-muted); }

/* Quiet per-service count in each "Missed … appointments" panel header */
.fo-lead-subgroup-count {
  margin-left: 8px; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--fo-grey-bg); border: 1px solid var(--fo-border);
  font-size: 11.5px; font-weight: 700; color: var(--fo-muted); text-align: center;
}
/* The per-service panels sit inside one wrapper, so its last one still needs the gap before Referrals */
#fo-leads-list-missed_appointment > .fo-unsent-panel:last-child { margin-bottom: 18px; }

/* ---------- Payment date (lightbox) ---------- */
.fo-pay-date { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; text-align: left; }
.fo-pay-date-label { font-size: 12.5px; font-weight: 700; color: var(--fo-muted); margin-right: 2px; }
/* Today / Yesterday / Other date share the rest of the row in three equal thirds */
.fo-pay-date-options { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fo-pay-date-chip {
  border: 1px solid var(--fo-border); background: var(--fo-grey-bg); color: var(--fo-ink); border-radius: 16px;
  padding: 6px 4px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-pay-date-chip:hover { border-color: var(--fo-brand); }
.fo-pay-date-chip.active { background: var(--fo-brand); border-color: var(--fo-brand); color: #fff; }
/* "Other date" is a chip like Today / Yesterday; outlined while its calendar is open */
#fo-pay-date-other[aria-expanded="true"]:not(.active) { border-color: var(--fo-brand); color: var(--fo-brand-dark); }

/* The app's own calendar (makeCalendar in app.js), used by every date picker */
.fo-cal { border: 1px solid var(--fo-border); border-radius: 8px; padding: 8px; background: var(--fo-card); }
.fo-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-cal-head button {
  width: 28px; height: 28px; border: none; border-radius: 6px; background: var(--fo-grey-bg);
  font-size: 17px; line-height: 1; color: var(--fo-brand-dark); cursor: pointer;
}
.fo-cal-head button:disabled { opacity: 0.35; cursor: default; }
.fo-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.fo-cal-dow { font-size: 10.5px; font-weight: 700; color: var(--fo-muted); padding: 2px 0; }
.fo-cal-day {
  border: none; background: none; border-radius: 6px; padding: 6px 0; font-family: inherit;
  font-size: 12.5px; color: var(--fo-ink); cursor: pointer;
}
.fo-cal-day:hover:not(:disabled) { background: var(--fo-grey-bg); }
.fo-cal-day.today { font-weight: 800; color: var(--fo-brand-dark); }
.fo-cal-day.selected { background: var(--fo-brand); color: #fff; }
.fo-cal-day:disabled { color: var(--fo-border); cursor: default; }
/* Inside the payment lightbox it sits in the flow, under the Received row */
.fo-pay-cal { flex-basis: 100%; }
/* Booking date: a field-styled button that opens the calendar in a lightbox */
.fo-date-btn {
  width: 100%; text-align: left; border: 1px solid var(--fo-border); border-radius: 8px; padding: 10px 12px;
  background: #fff; font-family: inherit; font-size: 14px; color: var(--fo-ink); cursor: pointer;
}
.fo-date-btn:focus { outline: 2px solid var(--fo-brand); outline-offset: 1px; }
.fo-date-lightbox-content { width: min(340px, 100%); }
.fo-date-lightbox-content .fo-cal { border: none; padding: 0; }
.fo-date-lightbox-content .fo-cal-day { padding: 9px 0; font-size: 14px; }

.fo-unsent-note { margin: -4px 0 10px; font-size: 11.5px; line-height: 1.45; color: var(--fo-muted); opacity: .85; }

/* Irregular client: a dot / text in the colour of the level — 1 yellow (more than 20% of their appointments missed or
   cancelled), 2 light red (more than 40%), 3 dark red (more than 60%) */
.fo-irregular-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--irr, #d33a2c); vertical-align: middle; }
.fo-irr-1 { --irr: #e6b400; }
.fo-irr-2 { --irr: #f0705f; }
.fo-irr-3 { --irr: #a31d1d; }
.fo-irregular-text { font-weight: 700; color: var(--irr, #d33a2c); }
.fo-irr-1.fo-irregular-text { color: #a98100; }
.fo-irregular-note { display: flex; align-items: center; margin: 8px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--irr, #d33a2c); }
.fo-irr-1.fo-irregular-note { color: #a98100; }

/* ---------- Admin console (admin/) ---------- */
.fo-ad-card { padding: 18px; margin-bottom: 18px; }
.fo-ad-title { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.fo-ad-note { margin: 0 0 16px; color: var(--fo-muted); font-size: 13px; line-height: 1.5; }
.fo-ad-help { color: var(--fo-muted); font-size: 12.5px; line-height: 1.45; text-transform: none; letter-spacing: normal; font-weight: 500; }
.fo-ad-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.fo-ad-meta { min-height: 18px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--fo-brand-dark); }
.fo-ad-warn { color: var(--fo-red); }
.fo-ad-textarea {
  width: 100%; box-sizing: border-box; min-height: 320px; border: 1px solid var(--fo-border); border-radius: 8px;
  padding: 10px 12px; background: #fff; color: var(--fo-ink); resize: vertical;
  font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.fo-ad-textarea:focus { outline: 2px solid var(--fo-brand); outline-offset: 1px; }
.fo-ad-textarea:disabled { background: var(--fo-grey-bg); }
.fo-ad-early { margin: 16px 0; }
.fo-ad-early input { max-width: 160px; }
@media (max-width: 560px) { .fo-ad-selects { grid-template-columns: 1fr; } }

/* Users tab: one row per user with an on/off switch */
.fo-ad-user { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--fo-border); }
.fo-ad-user:first-child { border-top: none; }
.fo-ad-user-who { min-width: 0; transition: opacity .15s ease; }
.fo-ad-user-name { font-weight: 800; font-size: 14.5px; }
.fo-ad-user-meta { color: var(--fo-muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.fo-ad-user-off .fo-ad-user-who { opacity: .5; }
.fo-ad-user-lock { color: var(--fo-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.fo-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.fo-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.fo-switch input:disabled { cursor: wait; }
.fo-switch-track { position: absolute; inset: 0; border-radius: 999px; background: #c9d6db; transition: background .15s ease; }
.fo-switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease;
}
.fo-switch input:checked + .fo-switch-track { background: var(--fo-green); }
.fo-switch input:checked + .fo-switch-track::after { transform: translateX(20px); }
.fo-switch input:focus-visible + .fo-switch-track { outline: 2px solid var(--fo-brand); outline-offset: 2px; }
.fo-ad-add { margin: 4px 0 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--fo-border); }
.fo-ad-add-row { display: flex; gap: 10px; }
.fo-ad-add-row input { flex: 1; min-width: 0; }
.fo-ad-add-btn { width: auto; flex-shrink: 0; padding: 9px 24px; }

/* Online consultations */
.fo-online-note { font-size: 12px; color: var(--fo-muted); text-align: right; }
.fo-online-note.fo-online-warn { color: var(--fo-red); }
.fo-online-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.fo-online-badge {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(0,133,174,0.1); color: var(--fo-brand);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 700;
}
.fo-online-badge.hidden { display: none; }

/* Online bookings: a violet slot with a small video-camera mark, so they stand apart from in-person ones */
.fo-slot-booked.fo-slot-online { background: #efe9fb; color: #5a3fa8; border-color: rgba(106,76,189,0.4); }
.fo-slot-booked.fo-slot-online:hover { background: #e2d8f6; }
.fo-slot-online-mark { position: absolute; top: 3px; left: 4px; line-height: 0; color: #6a4cbd; }
.fo-slot-online-mark svg { width: 15px; height: 11px; fill: currentColor; }

.fo-online-badge { background: #efe9fb; color: #5a3fa8; }
.fo-dot-online { background: #6a4cbd; }

/* Admin console: written rules */
.fo-ad-rules { margin: 4px 0 14px; padding-left: 22px; font-size: 14.5px; line-height: 1.6; }
.fo-ad-rules li { margin-bottom: 8px; }
.fo-ad-rules ul { margin: 6px 0 0; padding-left: 20px; }

/* Admin console: More tab cards */
.fo-ad-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fo-ad-switchrow .fo-ad-title { margin: 0; }
.fo-ad-pctrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 14px; }
.fo-ad-pctrow .fo-field { margin: 0; flex: 0 1 260px; }
.fo-ad-pctrow input[type=number] { max-width: 120px; }
.fo-ad-pctsave { width: auto; padding-left: 22px; padding-right: 22px; }
.fo-ad-line { padding: 10px 12px; border: 1px solid var(--fo-border); border-radius: 10px; background: var(--fo-grey-bg); font-size: 14px; line-height: 1.6; word-break: break-word; }
.fo-ad-recalc { width: auto; margin: 10px 0 6px; }
.fo-ad-card.fo-ad-off > .fo-ad-note, .fo-ad-card.fo-ad-off > .fo-ad-rules { opacity: .6; }

/* Token timings: the one-line list box is only as tall as its text (script sets the height) */
.fo-ad-linebox { min-height: 44px; resize: none; overflow: hidden; line-height: 1.6; }

/* Admin console: Services tab */
.fo-sv { border: 1px solid var(--fo-border); border-radius: 12px; margin-top: 10px; background: var(--fo-card); }
.fo-sv.open { border-color: var(--fo-brand); }
.fo-sv-head { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 13px 14px; border: none; background: none; font: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.fo-sv-head:hover { background: var(--fo-grey-bg); }
.fo-sv-name { font-weight: 800; font-size: 15px; text-transform: capitalize; color: var(--fo-ink); }
.fo-sv-sum { flex: 1; min-width: 0; font-size: 12.5px; color: var(--fo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-sv-chev { color: var(--fo-muted); transition: transform .15s ease; }
.fo-sv.open .fo-sv-chev { transform: rotate(180deg); }
.fo-sv-body { padding: 4px 14px 14px; }
.fo-sv-body.hidden { display: none; }
.fo-sv-gh { margin: 14px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--fo-muted); }
/* A six-column grid: fields span 2, 3, 4 or 6 columns, so every row is full and the edges line up */
.fo-sv-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; }
.fo-sv-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fo-sv-field.s2 { grid-column: span 2; }
.fo-sv-field.s3 { grid-column: span 3; }
.fo-sv-field.s4 { grid-column: span 4; }
.fo-sv-field.s6 { grid-column: span 6; }
@media (max-width: 640px) {
  .fo-sv-grid { grid-template-columns: 1fr; }
  .fo-sv-field.s2, .fo-sv-field.s3, .fo-sv-field.s4, .fo-sv-field.s6 { grid-column: 1 / -1; }
}.fo-sv-field label { font-size: 12.5px; font-weight: 700; color: var(--fo-ink); }
.fo-sv-field input, .fo-sv-field select { width: 100%; box-sizing: border-box; padding: 9px 10px; font: inherit; font-size: 14px; border: 1px solid var(--fo-border); border-radius: 8px; background: #fff; color: var(--fo-ink); }
.fo-sv-unset { font-weight: 500; color: var(--fo-muted); }
.fo-sv-days { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-sv-day { padding: 7px 12px; border: 1px solid var(--fo-border); background: #fff; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: var(--fo-muted); cursor: pointer; }
.fo-sv-day.on { background: var(--fo-brand-dark); border-color: var(--fo-brand-dark); color: #fff; }
.fo-sv-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; }
.fo-sv-actions .fo-sv-save { width: auto; padding-left: 24px; padding-right: 24px; }
.fo-sv-msg { font-size: 13px; color: var(--fo-muted); }
.fo-sv-msg.ok { color: var(--fo-green); font-weight: 700; }
.fo-sv-msg.err { color: var(--fo-red); font-weight: 600; }
@media (max-width: 560px) { .fo-sv-sum { display: none; } .fo-sv-name { flex: 1; } }

/* Services tab: quieter look */
.fo-sv-field label { font-size: 12px; font-weight: 700; color: var(--fo-muted); }
.fo-sv-field input, .fo-sv-field select { height: 40px; padding: 0 10px; }
.fo-sv-field input::placeholder { color: #a9b6bb; }
.fo-sv-gh { margin: 18px 0 8px; font-size: 11px; letter-spacing: .6px; }
.fo-sv-group:first-child .fo-sv-gh { margin-top: 6px; }
.fo-sv-days { gap: 6px; }
.fo-sv-day { padding: 8px 14px; }

/* Services tab: closed-on dates use the booking desk's calendar in a lightbox */
.fo-sv-datebtn { height: 40px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-sv-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; min-height: 28px; }
.fo-sv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--fo-grey-bg); color: var(--fo-brand-dark); font-size: 13px; font-weight: 700; }
.fo-sv-chip button { border: none; background: none; padding: 0 4px; font-size: 16px; line-height: 1; color: var(--fo-muted); cursor: pointer; }
.fo-sv-cal-done { width: 100%; }

/* Services tab: header = name, a pencil beside it, then the summary; the pencil opens rename / delete in a lightbox */
.fo-sv-top { display: flex; align-items: center; gap: 2px; padding-right: 6px; }
.fo-sv-top .fo-sv-head { width: auto; }
.fo-sv-namebtn { flex: 0 1 auto; min-width: 0; padding-right: 4px; }
.fo-sv-rest { flex: 1 1 auto; min-width: 0; padding-left: 8px; justify-content: flex-end; }
.fo-sv-edit { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: none; color: var(--fo-muted); cursor: pointer; }
.fo-sv-edit:hover { background: var(--fo-grey-bg); color: var(--fo-brand-dark); }
.fo-sv-edit svg { width: 16px; height: 16px; fill: currentColor; }
.fo-sv-manage { width: min(380px, 100%); }
.fo-sv-m-title { text-transform: capitalize; }
.fo-sv-m-label { display: block; margin: 4px 0 6px; font-size: 12px; font-weight: 700; color: var(--fo-muted); }
.fo-sv-m-hint { margin: 6px 0 0; }
.fo-sv-m-delete { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--fo-border); }
.fo-sv-m-delnote { margin: 0 0 8px; }
.fo-sv-m-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.fo-sv-m-ask.hidden { display: none; }
.fo-sv-m-del:disabled { opacity: .45; cursor: default; }
.fo-sv-m-msg { margin-top: 12px; min-height: 18px; }

/* Services tab: the seven day buttons always share one line, however narrow the screen */
.fo-sv-days { flex-wrap: nowrap; gap: 4px; }
.fo-sv-day { flex: 1 1 0; min-width: 0; max-width: 72px; padding: 8px 0; text-align: center; font-size: 12.5px; }

/* Services tab: name, fee and Add stay on one line on every screen width */

/* Services tab, phones: Save changes spans the whole width (its message sits underneath) */
@media (max-width: 640px) {
  .fo-sv-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .fo-sv-actions .fo-sv-save { width: 100%; }
}


/* Services tab: Save changes is full width on every screen, desktop included (its message sits underneath) */
.fo-sv-actions { flex-direction: column; align-items: stretch; gap: 8px; }
.fo-sv-actions .fo-sv-save { width: 100%; }

/* Services tab: Add a service is a card of its own, so the form needs no divider of its own */

/* Services tab: bulk edit */
.fo-sv-bulkbtn { flex: 0 0 auto; padding: 7px 16px; border: 1px solid var(--fo-brand); background: var(--fo-card); color: var(--fo-brand-dark); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fo-sv-bulkbtn:hover { background: var(--fo-brand); color: #fff; }
#fo-sv-b-name { width: 100%; height: 40px; padding: 0 10px; font: inherit; font-size: 14px; border: 1px solid var(--fo-border); border-radius: 8px; background: #fff; color: var(--fo-ink); text-transform: capitalize; }
.fo-sv-b-for { margin: 8px 0 4px; }
.fo-sv-b-form { margin-top: 6px; }
.fo-sv-b-form.hidden, .fo-sv-b-save.hidden { display: none; }
.fo-sv-b-save { width: 100%; margin-top: 16px; }
.fo-sv-b-msg { margin-top: 10px; min-height: 18px; }
.fo-sv-keep { color: var(--fo-muted); }
.fo-sv-bulk .fo-sv-field label { text-transform: none; }

/* Bulk edit is a panel on the page, not a lightbox */
.fo-sv-bulkpanel { margin: 12px 0 4px; padding: 14px; border: 1px solid var(--fo-brand); border-radius: 12px; background: var(--fo-card); }
.fo-sv-bulkpanel.hidden { display: none; }
.fo-sv-b-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 15px; }

/* Booking desk: the slot's time, or a token's arrival time, in big letters above the phone number */
.fo-slot-big { margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: var(--fo-grey-bg); text-align: center; }
.fo-slot-big-label { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--fo-muted); }
.fo-slot-big-value { margin-top: 2px; font-size: 40px; line-height: 1.1; font-weight: 800; color: var(--fo-brand-dark); }

/* Services lightbox: name and description, one Save, and a quiet Delete under it */
.fo-sv-m-input { width: 100%; height: 40px; padding: 0 10px; font: inherit; font-size: 14px; border: 1px solid var(--fo-border); border-radius: 8px; background: #fff; color: var(--fo-ink); }
.fo-sv-m-label { margin-top: 10px; }
.fo-sv-manage .fo-sv-m-save { width: 100%; margin-top: 16px; }
.fo-sv-manage .fo-sv-m-delete { margin-top: 14px; padding-top: 0; border-top: none; text-align: center; }
.fo-sv-m-del { border: none; background: none; padding: 4px 6px; font: inherit; font-size: 12.5px; color: var(--fo-muted); text-decoration: underline; cursor: pointer; }
.fo-sv-m-del:hover { color: var(--fo-red); }
.fo-sv-m-del.hidden { display: none; }
.fo-sv-m-del:disabled { opacity: .5; cursor: default; text-decoration: none; }
.fo-sv-m-delnote { margin: 4px 0 0; }
.fo-sv-m-ask { justify-content: center; }

/* The Online badge sits right beside the "Booked appointment" title */
.fo-step-title-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.fo-step-title-wrap .fo-online-badge { padding: 3px 10px; font-size: 12px; border-radius: 999px; }
.fo-online-row { justify-content: flex-start; }

/* Services tab: the seven day buttons share the whole width, with no empty space after the last one */
.fo-sv-day { max-width: none; }
.fo-sv-days { width: 100%; }

/* Add a service: the same labelled fields and button as the rest of the Services tab */
.fo-ad-card button { font-family: inherit; }
.fo-sv-add { margin: 0; }
.fo-sv-add-grid { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 12px 14px; align-items: end; }
.fo-sv-add-btn { width: auto; height: 40px; padding: 0 24px; border-radius: 8px; white-space: nowrap; }
.fo-sv-add .fo-sv-msg { display: block; margin-top: 8px; min-height: 18px; }
@media (max-width: 640px) {
  .fo-sv-add-grid { grid-template-columns: minmax(0, 1fr) 120px; }
  .fo-sv-add-btn { grid-column: 1 / -1; width: 100%; }
}

/* A booking the patient made on the public booking page: a small globe on the slot, a badge when it is opened */
.fo-slot-web-mark { position: absolute; bottom: 3px; right: 4px; line-height: 0; color: var(--fo-brand); opacity: .85; }
.fo-slot-web-mark svg { width: 12px; height: 12px; }
.fo-web-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(0,133,174,0.12); color: var(--fo-brand-dark); }
.fo-web-badge svg { width: 13px; height: 13px; }
.fo-web-badge.hidden { display: none; }
