/* Lead modal. Lives outside .trd-lp so it is not affected by that block's `all: initial`. */
.trd-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(13, 20, 36, 0.72);
  align-items: flex-start; justify-content: center; padding: 16px;
  overflow-y: auto; overscroll-behavior: contain;
}
.trd-overlay.is-open { display: flex; }
.trd-overlay *, .trd-overlay *::before, .trd-overlay *::after { box-sizing: border-box; }

/* The overlay is the scroll container: a card taller than the screen scrolls with it, and
   margin:auto still centres a short one (align-items:center would clip the top of a tall card). */
.trd-card {
  position: relative; background: #fff; color: #344054;
  width: 720px; max-width: 100%; margin: auto;
  border: 10px solid #cbd5e0; border-radius: 8px; padding: 20px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.5;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}
@media (max-width: 480px) {
  .trd-overlay { padding: 8px; }
  .trd-card { width: 380px; border-width: 6px; padding: 16px 14px; }
}

.trd-close {
  position: absolute; top: 4px; right: 6px; width: 32px; height: 32px;
  background: none; border: 0; border-radius: 4px; padding: 0;
  font-size: 24px; line-height: 1; color: #475467; cursor: pointer;
}
.trd-close:hover { color: #101828; }
.trd-card :focus-visible { outline: 2px solid #155eef; outline-offset: 2px; }

.trd-field { margin: 0 0 8px; }
.trd-label { display: block; font-weight: 500; color: #344054; margin: 0 28px 8px 0; }
/* The first label clears the close button; later ones use the full width. */
.trd-field + .trd-field .trd-label { margin-right: 0; }
.trd-input, .trd-select {
  width: 100%; height: 40px; padding: 8px 10px; font: inherit; color: #101828;
  background: #fff; border: 1px solid #d0d5dd; border-radius: 4px;
}
.trd-input::placeholder { color: #98a2b3; }
.trd-input[aria-invalid="true"], .trd-select[aria-invalid="true"] { border-color: #d92d20; }
.trd-phone { display: flex; gap: 8px; }
.trd-phone .trd-input { min-width: 0; }

/* Question groups: a fieldset of radio or checkbox options, each a large tap target. */
.trd-group { min-width: 0; padding: 0; border: 0; }
.trd-group > .trd-label { float: none; width: 100%; padding: 0; }
.trd-options { display: grid; gap: 8px; }
.trd-option {
  display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 12px;
  background: #fff; border: 1px solid #d0d5dd; border-radius: 4px; color: #344054; cursor: pointer;
}
.trd-option:hover { border-color: #98a2b3; }
.trd-choice {
  flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #155eef; cursor: pointer;
}
.trd-option-text { min-width: 0; overflow-wrap: anywhere; }
.trd-option:has(.trd-choice:checked) { border-color: #155eef; background: #eff4ff; color: #101828; box-shadow: inset 0 0 0 1px #155eef; }
.trd-option:has(.trd-choice:focus-visible) { outline: 2px solid #155eef; outline-offset: 2px; }
.trd-option:has(.trd-choice:disabled) { opacity: 0.5; cursor: not-allowed; }
.trd-option:has(.trd-choice:disabled):hover { border-color: #d0d5dd; }
.trd-option:has(.trd-choice:disabled) .trd-choice { cursor: not-allowed; }
.trd-group.is-invalid .trd-option:not(:has(.trd-choice:checked)) { border-color: #d92d20; }
.trd-phone .trd-select { width: 150px; flex: none; }
@media (max-width: 480px) { .trd-phone .trd-select { width: 120px; } }
.trd-error { min-height: 20px; margin: 6px 0 0; font-size: 13px; color: #d92d20; }
.trd-error.is-hint { color: #475467; }
.trd-suggest { padding: 0; border: 0; background: none; font: inherit; color: #155eef; text-decoration: underline; cursor: pointer; }
.trd-submit-error { margin: 12px 0 0; font-size: 13px; color: #d92d20; }
.trd-submit-error a { color: inherit; text-decoration: underline; }

.trd-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px -20px -20px; padding: 12px 20px; background: #f9fafb;
}
@media (max-width: 480px) { .trd-actions { margin: 12px -14px -16px; padding: 12px 14px; } }
.trd-actions .trd-spacer { flex: 1; }
.trd-btn {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0;
  padding: 6px 4px; font: inherit; font-weight: 700; cursor: pointer; color: #155eef;
}
.trd-btn[disabled] { opacity: 0.6; cursor: default; }
.trd-spinner {
  width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: trd-spin 0.7s linear infinite;
}
@keyframes trd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .trd-spinner { animation-duration: 2s; } }

.trd-thanks { padding: 24px 8px; text-align: center; font-size: 17px; color: #101828; }
.trd-thanks:focus { outline: none; }
.trd-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.trd-ts { margin-top: 12px; }

/* Booking state: the card widens to hold Cal's inline embed (js/booking.js). */
.trd-overlay.has-booking { align-items: flex-start; }
.trd-card.is-booking { width: 1000px; margin: auto; padding: 20px 16px 16px; }
@media (max-width: 480px) {
  .trd-overlay.has-booking { padding: 8px; }
  .trd-card.is-booking { width: 100%; border-width: 4px; padding: 16px 8px 8px; }
}
.trd-booking-title { margin: 0 32px 12px 0; font-size: 17px; font-weight: 500; color: #101828; }
.trd-booking-title:focus { outline: none; }
.trd-booking-title[hidden] { display: none; }
.trd-embed { width: 100%; }
.trd-embed.is-pending { height: 0; overflow: hidden; }
.trd-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 160px; font-size: 15px; color: #475467;
}
.trd-fallback { padding: 20px 8px; text-align: center; font-size: 16px; color: #101828; }
.trd-fallback:focus { outline: none; }
.trd-fallback p { margin: 0 0 12px; }
.trd-fallback a { color: #155eef; text-decoration: underline; }

/* /book page: the embed sits in a white panel under the shared header. */
.trd-book-page {
  max-width: 1000px; margin: 24px 0 0; padding: 12px; background: #fff; border-radius: 8px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; line-height: 1.5; color: #344054;
}
.trd-book-page *, .trd-book-page *::before, .trd-book-page *::after { box-sizing: border-box; }
