/* =====================================================================
   Concrete Inspection Specialist — Scheduler section
   "Field Dossier" design system: hairlines, mono labels, square radii.
   Loads after v2.css. Uses only CSS vars from tokens.css.
   No emojis. All colours verified WCAG AA.
   ===================================================================== */

/* ---- Section container ---------------------------------------------- */
#schedule {
  background: var(--paper-2);
  border-top: var(--hairline);
}

/* ---- Section head override for this section ------------------------- */
#schedule .s-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

#schedule .s-head .eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel-600);
}

#schedule .s-head__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  margin-top: 0.35rem;
}

#schedule .s-head__lead {
  color: var(--steel-600);
  font-size: var(--fs-lead);
  max-width: 62ch;
  margin-top: 0.75rem;
}

/* ---- Two-column grid ------------------------------------------------ */
.sched-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

@media (max-width: 860px) {
  .sched-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Both cards: frame-tick + dossier sheet ------------------------- */
.sched-card {
  background: var(--white);
  border: var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

/* ---- Mono sub-labels inside cards ----------------------------------- */
.sched-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel-500);
  display: block;
  margin-bottom: 1.1rem;
}

/* ---- Fee lookup area ------------------------------------------------ */
.fee-lookup {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fee-lookup .field {
  margin-bottom: 0.75rem;
}

.fee-lookup .label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--steel-700);
  display: block;
  margin-bottom: 0.4rem;
}

.fee-lookup .input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: var(--hairline);
  border-radius: var(--r);
  background: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  box-sizing: border-box;
}

.fee-lookup .input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.fee-lookup .help {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--steel-500);
  letter-spacing: 0.04em;
  margin-top: 0.3rem;
  display: block;
}

.fee-lookup .error-msg {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--danger);
  letter-spacing: 0.02em;
  margin-top: 0.35rem;
  align-items: center;
  gap: 0.35rem;
}

.fee-lookup .error-msg.is-visible {
  display: flex;
}

.fee-lookup .error-msg svg {
  flex: none;
  width: 14px;
  height: 14px;
}

/* full-width fee button */
.btn--fee {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

/* ---- Fee result panel ----------------------------------------------- */
#fee-result {
  display: none;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: var(--hairline);
  border-radius: var(--r);
  background: var(--paper);
}

#fee-result.is-visible {
  display: block;
}

.fee-result__amount {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
}

.fee-result__area {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--steel-500);
  display: block;
  margin-top: 0.4rem;
}

.fee-result__nomatch {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--steel-700);
  line-height: 1.55;
}

.fee-result__nomatch a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fee-result__nomatch a:hover {
  color: var(--accent-600);
}

/* ---- Sched divider between fee lookup and scheduler feature rows ---- */
.sched-divider {
  border: none;
  border-top: var(--hairline);
  margin: 1.5rem 0;
}

/* ---- Feature rows: working hours / live availability / payment ------ */
.sched-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sched-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--fs-sm);
  color: var(--steel-700);
  line-height: 1.5;
}

.sched-feature__tick {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 0.2rem;
  color: var(--accent);
}

/* ---- Cal embed card (right column) ---------------------------------- */
.sched-cal-card {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

#cal-embed {
  flex: 1;
  min-height: 520px;
  position: relative;
}

/* ---- Placeholder panel inside #cal-embed ---------------------------- */
#cal-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px dashed var(--steel-300);
  border-radius: var(--r);
  background: var(--paper);
  text-align: center;
}

/* When hidden by mountCal() */
#cal-placeholder.is-hidden {
  display: none;
}

.cal-ph__icon {
  width: 52px;
  height: 52px;
  color: var(--steel-400);
  flex: none;
}

.cal-ph__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--steel-700);
  margin: 0;
}

.cal-ph__body {
  font-size: var(--fs-sm);
  color: var(--steel-600);
  max-width: 38ch;
  line-height: 1.6;
  margin: 0;
}

/* ---- Chip row inside placeholder ------------------------------------ */
.cal-ph__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.cal-ph__chips .chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.75rem;
  border: var(--hairline);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--steel-600);
  white-space: nowrap;
}

/* ph chip — placeholder / TBC styling */
.cal-ph__chips .chip.ph {
  color: var(--steel-400);
  border-style: dashed;
}

/* ---- Bottom mono spec note ------------------------------------------ */
.sched-spec {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--steel-500);
  text-align: center;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: 1rem;
  border-top: var(--hairline);
}

/* ---- Mobile adjustments --------------------------------------------- */
@media (max-width: 480px) {
  .btn--fee {
    font-size: 0.82rem;
    padding: 0.85rem 1.1rem;
  }

  .fee-result__amount {
    font-size: 2rem;
  }

  .sched-cal-card {
    min-height: 420px;
  }

  #cal-embed {
    min-height: 420px;
  }
}

/* ---- Reduced motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .fee-lookup .input,
  #fee-result {
    transition: none;
  }
}
