/* ============================================================================
   scheduler.css -- /call/ booking page
   Sibling of /services/ai-implementation and /intake/saas-contracts.
   Light theme only. Uses firm.css design tokens.
   ============================================================================ */

*{margin:0;padding:0;box-sizing:border-box}

.is-hidden{display:none !important}
.name-input-spacer{margin-bottom:8px}

body{
  font-family:var(--font-family,'Inter',system-ui,sans-serif);
  background:var(--surface);
  color:var(--text-primary);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

/* -- Top header ------------------------------------------------------------ */
.header{
  padding:var(--space-tight) var(--space-base);
  background:var(--surface-elevated);
  border-bottom:1px solid var(--border);
}
.header-inner{
  max-width:1180px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:var(--space-tight);
}
.brand{
  font-size:var(--text-base);
  font-weight:600;
  color:var(--text-primary);
}
.brand a{color:inherit;text-decoration:none}
.brand-creds{
  font-size:var(--text-xs);
  color:var(--text-secondary);
  margin-top:2px;
}

/* -- Hero / above-the-fold ------------------------------------------------- */
.hero{
  max-width:1180px;
  margin:0 auto;
  padding:var(--space-base) var(--space-base) var(--space-tight);
}
.page-title{
  font-size:var(--heading-1);
  font-weight:700;
  color:var(--text-primary);
  line-height:1.15;
  letter-spacing:-0.01em;
  margin-bottom:var(--space-tight);
}
.lede{
  font-size:var(--text-lg);
  color:var(--text-secondary);
  max-width:740px;
  margin-bottom:var(--space-base);
}
.price-anchor{
  display:inline-flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:var(--space-tight);
  padding:0.875rem 1.25rem;
  background:var(--surface-elevated);
  border:1px solid var(--border);
  border-radius:var(--border-radius);
  margin-bottom:var(--space-base);
  font-size:var(--text-base);
  color:var(--text-secondary);
}
.price-anchor strong{
  font-size:var(--heading-3);
  color:var(--text-primary);
  font-weight:700;
}
.price-anchor .price-note{
  font-size:var(--text-sm);
  color:var(--text-tertiary);
  padding-left:var(--space-tight);
  border-left:1px solid var(--border);
}
.how-it-works{
  list-style:none;
  counter-reset:step;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--space-tight);
  margin-bottom:var(--space-base);
}
.how-it-works li{
  counter-increment:step;
  padding:var(--space-tight) var(--space-tight) var(--space-tight) 2.75rem;
  background:var(--surface-elevated);
  border:1px solid var(--border);
  border-radius:var(--border-radius);
  font-size:var(--text-sm);
  color:var(--text-secondary);
  position:relative;
  min-height:44px;
}
.how-it-works li::before{
  content:counter(step);
  position:absolute;
  left:var(--space-tight);
  top:50%;
  transform:translateY(-50%);
  width:1.5rem;height:1.5rem;border-radius:50%;
  background:var(--accent);color:var(--surface-elevated);
  font-size:var(--text-xs);font-weight:700;
  display:flex;align-items:center;justify-content:center;
}

/* -- Travel notice --------------------------------------------------------- */
.travel-notice{
  display:none;
  align-items:center;gap:0.625rem;
  max-width:1180px;
  margin:0 auto var(--space-base);
  padding:0.75rem 1.25rem;
  background:#fff8e6;
  border:1px solid #f1c773;
  border-radius:var(--border-radius);
  font-size:var(--text-sm);
  color:#6b4d11;
}
.travel-notice.show{display:flex}

/* -- Payment return banner ------------------------------------------------- */
/* Informational only. NEVER claims payment is verified. */
.payment-return-banner{
  max-width:1180px;
  margin:0 auto var(--space-base);
  padding:0.875rem 1.25rem;
  background:rgba(30,58,138,.08);
  border:1px solid rgba(30,58,138,.25);
  border-left:3px solid var(--accent);
  border-radius:var(--border-radius);
  font-size:var(--text-sm);
  color:var(--text-primary);
  line-height:1.55;
  min-height:44px;
  display:block;
}
.payment-return-banner strong{color:var(--text-primary);font-weight:600}

/* -- Optional field (PayPal txn id) --------------------------------------- */
.field.optional .field-hint{
  display:block;
  margin-top:6px;
  font-size:var(--text-xs);
  color:var(--text-tertiary);
  line-height:1.5;
}

/* -- Main layout ----------------------------------------------------------- */
.main{
  flex:1;
  max-width:1180px;
  width:100%;
  margin:0 auto;
  padding:0 var(--space-base) var(--space-base);
  display:grid;
  grid-template-columns:1fr 380px;
  gap:var(--space-base);
}
.col-cal{
  background:var(--surface-elevated);
  border:1px solid var(--border);
  border-radius:var(--border-radius);
  padding:var(--space-base);
  display:flex;flex-direction:column;
}
.col-form{
  background:var(--surface-elevated);
  border:1px solid var(--border);
  border-radius:var(--border-radius);
  padding:var(--space-base);
  display:none;flex-direction:column;
}
.col-form.show{display:flex;animation:slideIn .25s ease-out}
@keyframes slideIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

/* -- Next-available pill --------------------------------------------------- */
.next-avail{
  display:flex;align-items:center;gap:0.625rem;
  padding:0.75rem 1rem;border-radius:var(--border-radius);
  margin-bottom:var(--space-base);
  background:var(--surface);
  border:1px solid var(--border);
  cursor:pointer;transition:border-color .15s,background .15s;
  min-height:44px;
}
.next-avail:hover{border-color:var(--accent);background:var(--surface-elevated)}
.na-dot{width:8px;height:8px;border-radius:50%;background:#16a34a;animation:pulse 2s infinite;flex-shrink:0}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
.na-text{font-size:var(--text-sm);color:var(--text-secondary);flex:1}
.na-text strong{color:var(--text-primary);font-weight:600}
.na-jump{font-size:var(--text-xs);color:var(--accent);font-weight:600}

/* -- Calendar -------------------------------------------------------------- */
.cal-head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:var(--space-tight);
}
.cal-month{
  font-size:var(--heading-3);
  color:var(--text-primary);
  font-weight:600;
}
.cal-nav{display:flex;gap:4px}
.cal-nav button{
  width:44px;height:44px;border-radius:var(--border-radius);
  border:1px solid var(--border);background:var(--surface-elevated);
  color:var(--text-secondary);cursor:pointer;font-size:18px;
  display:flex;align-items:center;justify-content:center;
  transition:all .12s;
}
.cal-nav button:hover{background:var(--surface);color:var(--text-primary);border-color:var(--accent)}

.weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:4px}
.weekdays span{
  text-align:center;
  font-size:0.6875rem;font-weight:700;
  color:var(--text-tertiary);
  text-transform:uppercase;letter-spacing:.08em;
  padding:8px 0;
}
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.day{
  text-align:center;padding:14px 0;
  border-radius:var(--border-radius);
  font-size:var(--text-sm);font-weight:500;
  color:var(--text-secondary);
  cursor:pointer;transition:all .1s;
  position:relative;
  background:var(--surface);border:1px solid transparent;
  min-height:44px;
}
.day:hover:not(.x):not(.past){background:var(--surface-elevated);border-color:var(--border);color:var(--text-primary)}
.day.today{color:var(--accent);font-weight:700;background:rgba(30,58,138,.08)}
.day.selected{background:var(--accent);color:var(--surface-elevated);font-weight:700;border-color:var(--accent)}
.day.past{color:var(--text-tertiary);background:transparent;cursor:default;opacity:.5}
.day.x{pointer-events:none;background:transparent}
.day.available::after{
  content:'';position:absolute;bottom:5px;left:50%;
  transform:translateX(-50%);
  width:4px;height:4px;border-radius:50%;background:#16a34a;
}

.legend{display:flex;gap:1rem;margin-top:var(--space-tight);justify-content:flex-end}
.leg{display:flex;align-items:center;gap:5px;font-size:var(--text-xs);color:var(--text-tertiary)}
.leg .dot{width:5px;height:5px;border-radius:50%;background:#16a34a}

/* -- Time slots ------------------------------------------------------------ */
.slots-area{margin-top:var(--space-base);display:none}
.slots-area.show{display:block}
.slots-head{
  font-size:var(--text-base);font-weight:600;
  color:var(--text-primary);margin-bottom:6px;
}
.slots-sub{
  font-size:var(--text-xs);
  color:var(--text-tertiary);margin-bottom:var(--space-tight);
}
.slots-grid{display:flex;flex-wrap:wrap;gap:8px}
.slot{
  padding:0.625rem 1.25rem;border-radius:var(--border-radius);
  font-size:var(--text-sm);font-weight:500;
  border:1px solid var(--border);color:var(--text-secondary);
  cursor:pointer;background:var(--surface-elevated);
  transition:all .12s;min-height:44px;
  display:flex;align-items:center;
}
.slot:hover{border-color:var(--accent);color:var(--accent)}
.slot.selected{background:var(--accent);color:var(--surface-elevated);border-color:var(--accent)}

/* -- Booking form ---------------------------------------------------------- */
.form-title{
  font-size:var(--heading-3);
  color:var(--text-primary);
  font-weight:600;
  margin-bottom:var(--space-base);
}
.form-section{margin-bottom:var(--space-tight)}
.form-label{
  font-size:0.6875rem;font-weight:700;
  color:var(--text-tertiary);
  text-transform:uppercase;letter-spacing:.06em;
  margin-bottom:6px;
}
.form-value{font-size:var(--text-sm);color:var(--text-primary)}
.form-value.placeholder{color:var(--text-tertiary);font-style:italic}
.tz-dual{font-size:var(--text-xs);color:var(--text-tertiary);margin-top:2px}

.form-input{
  width:100%;padding:0.625rem 0.75rem;
  border-radius:var(--border-radius);border:1px solid var(--border);
  background:var(--surface-elevated);
  color:var(--text-primary);
  font-size:16px;
  font-family:inherit;outline:none;
  transition:border-color .15s;
  min-height:44px;
}
.form-input:focus{border-color:var(--accent)}
.form-input::placeholder{color:var(--text-tertiary)}
.form-textarea{resize:vertical;min-height:80px;max-height:160px;line-height:1.5}

/* -- File upload ----------------------------------------------------------- */
.upload-zone{
  border:1px dashed var(--border);border-radius:var(--border-radius);
  padding:1rem;text-align:center;cursor:pointer;
  transition:all .15s;position:relative;
  margin-top:8px;
}
.upload-zone:hover{border-color:var(--accent);background:rgba(30,58,138,.04)}
.upload-zone.dragging{border-color:var(--accent);background:rgba(30,58,138,.06);border-style:solid}
.upload-zone input{position:absolute;inset:0;opacity:0;cursor:pointer}
.upload-icon{font-size:20px;margin-bottom:4px}
.upload-text{font-size:var(--text-sm);color:var(--text-secondary)}
.upload-text strong{color:var(--text-primary);font-weight:600}
.upload-hint{font-size:var(--text-xs);color:var(--text-tertiary);margin-top:4px}

.file-list{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.file-item{
  display:flex;align-items:center;gap:0.625rem;
  padding:0.625rem 0.75rem;border-radius:var(--border-radius);
  background:var(--surface);border:1px solid var(--border);
  font-size:var(--text-xs);color:var(--text-secondary);
}
.file-item .file-icon{font-size:18px;flex-shrink:0}
.file-item .file-info{flex:1;min-width:0}
.file-item .file-name{
  font-weight:500;color:var(--text-primary);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-size:var(--text-sm);
}
.file-item .file-meta{font-size:var(--text-xs);color:var(--text-tertiary);margin-top:2px}
.file-item .file-status{display:flex;align-items:center;gap:6px;font-size:var(--text-xs);margin-top:4px}
.file-item .file-status.uploading{color:var(--accent)}
.file-item .file-status.uploaded{color:#16a34a}
.file-item .file-status.error{color:#dc2626}
.file-item .progress-bar{flex:1;height:4px;background:var(--border);border-radius:2px;overflow:hidden}
.file-item .progress-fill{height:100%;background:var(--accent);border-radius:2px;transition:width .2s}
.file-item button{
  background:none;border:none;color:var(--text-tertiary);
  cursor:pointer;font-size:16px;padding:6px;border-radius:4px;
  transition:all .12s;min-height:32px;min-width:32px;
}
.file-item button:hover{background:var(--surface-elevated);color:var(--text-primary)}
.file-summary{
  margin-top:8px;padding:8px 12px;border-radius:6px;
  background:rgba(22,163,74,.08);border:1px solid rgba(22,163,74,.2);
  font-size:var(--text-xs);color:#15803d;
  display:flex;align-items:center;gap:6px;
}

/* -- Booking review block -------------------------------------------------- */
.booking-review{
  background:var(--surface);
  border:1px solid var(--border);border-radius:var(--border-radius);
  padding:1rem;margin:var(--space-tight) 0;
}
.review-header{
  font-size:0.6875rem;font-weight:700;
  color:var(--text-tertiary);
  text-transform:uppercase;letter-spacing:.06em;
  margin-bottom:0.625rem;
}
.review-row{
  display:flex;justify-content:space-between;align-items:flex-start;
  padding:6px 0;font-size:var(--text-sm);
}
.review-row:not(:last-child){border-bottom:1px solid var(--border)}
.review-label{color:var(--text-tertiary)}
.review-value{color:var(--text-primary);font-weight:500;text-align:right;max-width:60%}

/* -- Submit button --------------------------------------------------------- */
.submit-btn{
  width:100%;padding:0.875rem 1.25rem;
  border-radius:var(--border-radius);border:none;
  background:var(--border);color:var(--text-tertiary);
  font-size:var(--text-base);font-weight:600;
  cursor:not-allowed;transition:all .15s;margin-top:auto;
  min-height:48px;
  font-family:inherit;
}
.submit-btn.ready{background:var(--accent);color:var(--surface-elevated);cursor:pointer}
.submit-btn.ready:hover{filter:brightness(1.1)}
.submit-btn.loading{opacity:.7;cursor:wait}

.transcript-note{
  margin-top:var(--space-tight);
  font-size:var(--text-xs);
  color:var(--text-tertiary);
  line-height:1.5;
}

/* -- Footer ---------------------------------------------------------------- */
.footer{
  padding:var(--space-tight) var(--space-base);
  background:var(--surface-elevated);
  border-top:1px solid var(--border);
}
.footer-inner{
  max-width:1180px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px;
}
.ft-brand{
  font-size:var(--text-sm);color:var(--text-primary);font-weight:600;
}
.ft-info{
  font-size:var(--text-xs);color:var(--text-tertiary);text-align:right;line-height:1.5;
}

/* -- Select-date prompt (right column, before slot click) ------------------ */
.select-prompt{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:var(--space-loose) var(--space-base);text-align:center;flex:1;
}
.select-prompt-icon{font-size:48px;margin-bottom:1rem;opacity:.5}
.select-prompt-text{
  font-size:var(--text-sm);color:var(--text-tertiary);
  max-width:240px;line-height:1.5;
}

/* -- Confirmation screen --------------------------------------------------- */
.confirmation{
  position:fixed;inset:0;background:var(--surface);z-index:100;
  display:none;flex-direction:column;align-items:center;justify-content:center;
  padding:var(--space-base);text-align:center;overflow-y:auto;
}
.confirmation.show{display:flex}
.conf-icon{
  font-size:56px;margin-bottom:var(--space-tight);
  color:#16a34a;font-weight:700;
}
.conf-title{
  font-size:var(--heading-2);
  color:var(--text-primary);
  font-weight:700;
  margin-bottom:8px;
}
.conf-subtitle{
  font-size:var(--text-base);
  color:var(--text-secondary);
  margin-bottom:var(--space-base);
  max-width:520px;
}
.conf-card{
  background:var(--surface-elevated);
  border:1px solid var(--border);border-radius:var(--border-radius);
  padding:var(--space-base);max-width:420px;width:100%;
  text-align:left;margin-bottom:var(--space-base);
}
.conf-row{
  display:flex;justify-content:space-between;
  padding:8px 0;border-bottom:1px solid var(--border);
}
.conf-row:last-child{border-bottom:none}
.conf-row-label{font-size:var(--text-xs);color:var(--text-tertiary)}
.conf-row-value{font-size:var(--text-sm);color:var(--text-primary);font-weight:500}
.conf-zoom{
  display:block;padding:0.875rem 1.5rem;
  background:var(--accent);color:var(--surface-elevated);
  border-radius:var(--border-radius);
  font-weight:600;text-decoration:none;text-align:center;
  min-height:48px;
}
.conf-zoom:hover{filter:brightness(1.1);text-decoration:none}
.conf-email{
  font-size:var(--text-xs);color:var(--text-tertiary);
  margin-top:var(--space-tight);text-align:center;
}
.conf-email strong{color:var(--text-primary)}
.conf-note{
  margin-top:var(--space-base);
  padding:0.875rem 1rem;border-radius:var(--border-radius);
  background:rgba(30,58,138,.06);border:1px solid rgba(30,58,138,.15);
  font-size:var(--text-xs);color:var(--text-secondary);line-height:1.6;
  max-width:420px;
}

.conf-payment-message{
  margin-top:var(--space-tight);
  padding:1rem 1.25rem;
  border-radius:var(--border-radius);
  background:rgba(30,58,138,.05);
  border:1px solid rgba(30,58,138,.18);
  border-left:3px solid var(--accent);
  font-size:var(--text-sm);
  color:var(--text-primary);
  line-height:1.6;
  max-width:520px;
  text-align:left;
}
.conf-payment-message p{margin:0 0 0.625rem}
.conf-payment-message p:last-child{margin-bottom:0}
.conf-payment-message strong{font-weight:600;color:var(--text-primary)}
.conf-pay-link{
  display:inline-block;
  padding:0.625rem 1rem;
  background:var(--accent);
  color:var(--surface-elevated);
  border-radius:var(--border-radius);
  font-weight:600;
  text-decoration:none;
  min-height:44px;
  line-height:1.7;
}
.conf-pay-link:hover{filter:brightness(1.1);text-decoration:none;color:var(--surface-elevated)}

/* -- Loading overlay ------------------------------------------------------- */
.loading-overlay{
  position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:99;
  display:none;align-items:center;justify-content:center;
}
.loading-overlay.show{display:flex}
.spinner{
  width:40px;height:40px;
  border:3px solid var(--border);border-top-color:var(--accent);
  border-radius:50%;animation:spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* -- Responsive ------------------------------------------------------------ */
@media(max-width:880px){
  .main{grid-template-columns:1fr}
  .how-it-works{grid-template-columns:1fr}
  .col-form.show{margin-bottom:var(--space-base)}
}
@media(max-width:768px){
  .hero{padding:var(--space-tight) var(--space-tight) 0}
  .main{padding:0 var(--space-tight) var(--space-tight);gap:var(--space-tight)}
  .col-cal,.col-form{padding:var(--space-tight)}
  .page-title{font-size:1.875rem}
  .lede{font-size:var(--text-base)}
  .price-anchor{width:100%;flex-direction:column;align-items:flex-start;gap:6px}
  .price-anchor .price-note{padding-left:0;border-left:none}
  .header{padding:0.625rem var(--space-tight)}
  .slots-grid{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px}
  .slot{flex-shrink:0}
  .day{padding:12px 0;font-size:var(--text-sm)}
}
@media(max-width:480px){
  .page-title{font-size:1.625rem}
  .cal-month{font-size:var(--text-lg)}
}
@media(max-width:375px){
  .day{padding:10px 0;font-size:var(--text-xs)}
  .price-anchor strong{font-size:var(--text-lg)}
}
