.tbdlp {
  --tbdlp-ink: #f8f4ec;
  --tbdlp-muted: #cfc6b8;
  --tbdlp-border: rgba(214, 166, 85, 0.5);
  --tbdlp-surface: #171411;
  --tbdlp-surface-soft: #211d18;
  --tbdlp-field: #fbf7ef;
  --tbdlp-field-border: #c7b79f;
  --tbdlp-field-text: #1b1814;
  --tbdlp-primary: #d79a34;
  --tbdlp-primary-hover: #efb24d;
  --tbdlp-error: #ffdad4;
  --tbdlp-error-bg: rgba(142, 38, 24, 0.38);
  --tbdlp-focus: #f6c765;
  --tbdlp-heading-color: #ffffff;

  position: relative;
  font-family: inherit;
  max-width: 1120px;
  margin: 0 auto;
  /* No `color` here — the dark-surface text color is set on .tbdlp__panel,
   * so the intro title (which sits outside panels) inherits the page's color. */
}

.tbdlp *,
.tbdlp *::before,
.tbdlp *::after {
  box-sizing: border-box;
}

/* Title now lives INSIDE the form panel — uses the configurable heading
 * color so it sits well on the dark surface. */
.tbdlp h2.tbdlp__title {
  color: var(--tbdlp-heading-color);
  font-size: clamp(1.125rem, 1.2vw + 1rem, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 1.1rem;
  text-align: center;
  text-transform: uppercase;
}

.tbdlp__panel {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, var(--tbdlp-surface-soft), var(--tbdlp-surface));
  border: 1px solid var(--tbdlp-border);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  position: relative;
  color: var(--tbdlp-ink);
}

.tbdlp__panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #8a5a24, var(--tbdlp-primary), #f0c56b);
  z-index: 2;
  pointer-events: none;
}

.tbdlp__form-panel {
  max-width: 1080px;
  min-height: clamp(520px, 62vw, 650px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tbdlp__form-panel::before {
  display: none;
}

.tbdlp__form-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 14px;
  background: url("calendar-preview.png") center / cover no-repeat;
  box-shadow: none;
  filter: blur(6px);
  opacity: 0.72;
  transform: scale(1.04);
  transform-origin: center;
  pointer-events: none;
  z-index: 0;
}

.tbdlp__form-panel > * {
  position: relative;
  z-index: 1;
}

.tbdlp__form-card {
  width: min(430px, 100%);
  padding: clamp(1.15rem, 3vw, 1.75rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.10), transparent 45%),
    rgba(23, 20, 17, 0.92);
  border: 1px solid rgba(215, 154, 52, 0.58);
  border-radius: 10px;
  box-shadow:
    0 24px 65px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(2px);
}

.tbdlp__form {
  margin: 0;
}

.tbdlp__field {
  min-width: 0;
}

.tbdlp__field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--tbdlp-ink);
  text-transform: uppercase;
}

.tbdlp__field input {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--tbdlp-field-border);
  border-radius: 6px;
  background: var(--tbdlp-field);
  color: var(--tbdlp-field-text);
  font: inherit;
  line-height: 1.25;
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.tbdlp__field input:focus {
  border-color: var(--tbdlp-primary);
  outline: 3px solid rgba(246, 199, 101, 0.35);
  background: #ffffff;
}

.tbdlp__field-help {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--tbdlp-muted);
  line-height: 1.4;
}

.tbdlp__submit {
  width: 100%;
  min-height: 52px;
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--tbdlp-primary-hover), var(--tbdlp-primary));
  color: #19130c;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.tbdlp__submit:hover {
  background: linear-gradient(180deg, #ffd17b, var(--tbdlp-primary-hover));
  transform: translateY(-1px);
}

.tbdlp__submit:focus-visible,
.tbdlp__back:focus-visible {
  outline: 3px solid var(--tbdlp-focus);
  outline-offset: 3px;
}

/* Headings focused programmatically (for screen-reader announcement) — no
 * need for a visible focus ring on a non-interactive element. */
.tbdlp__loading-heading:focus,
.tbdlp__calendar-heading:focus {
  outline: none;
}

.tbdlp__error {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.8rem;
  border-left: 4px solid #f08a74;
  background: var(--tbdlp-error-bg);
  color: var(--tbdlp-error);
  font-size: 0.95rem;
  font-weight: 700;
}

/* Out-of-area inline message — informational, not alarming. */
.tbdlp__error.tbdlp__error--info {
  border-left-color: var(--tbdlp-primary-hover);
  background: rgba(215, 154, 52, 0.18);
  color: var(--tbdlp-ink);
  font-weight: 500;
  line-height: 1.5;
}

.tbdlp__error.tbdlp__error--info a {
  color: var(--tbdlp-primary-hover);
  text-decoration: underline;
  font-weight: 700;
}

.tbdlp__error.tbdlp__error--info strong {
  color: var(--tbdlp-heading-color);
}

.tbdlp__loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
}

.tbdlp__loading[hidden] {
  display: none;
}

.tbdlp__availability-mark {
  display: grid;
  gap: 0.45rem;
  width: min(220px, 70vw);
  margin: 0 auto 1.2rem;
}

.tbdlp__availability-mark span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent),
    linear-gradient(90deg, #8a5a24, var(--tbdlp-primary), #5f3c18);
  background-size: 80px 100%, 100% 100%;
  background-position: -90px 0, 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: tbdlp-availability-sweep 1.05s ease-in-out infinite;
}

.tbdlp__availability-mark span:nth-child(2) {
  width: 82%;
  margin-left: auto;
  animation-delay: 0.14s;
}

.tbdlp__availability-mark span:nth-child(3) {
  width: 68%;
  animation-delay: 0.28s;
}

.tbdlp h3.tbdlp__calendar-heading,
.tbdlp h3.tbdlp__loading-heading {
  font-size: clamp(1.125rem, 1vw + 1rem, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  color: var(--tbdlp-heading-color);
}

.tbdlp__loading p {
  max-width: 560px;
  margin: 0 auto 1rem;
  color: var(--tbdlp-muted);
  line-height: 1.5;
}

.tbdlp__calendar {
  max-width: 900px;
  margin: 0 auto;
}

.tbdlp__back {
  min-height: 40px;
  background: transparent;
  border: 0;
  padding: 0.45rem 0;
  font: inherit;
  font-weight: 800;
  color: var(--tbdlp-primary-hover);
  cursor: pointer;
  text-transform: uppercase;
}

.tbdlp__back:hover {
  color: var(--tbdlp-heading-color);
  text-decoration: underline;
}

.tbdlp__iframe-wrap {
  position: relative;
  min-height: 650px;
}

.tbdlp__iframe-wrap iframe {
  width: 100%;
  min-height: 650px;
  border: 0;
  overflow: hidden;
}

.tbdlp__preload-tray {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 100%;
  max-width: 900px;
  height: 650px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.tbdlp__spinner {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(215, 154, 52, 0.25);
  border-top-color: var(--tbdlp-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: tbdlp-spin 0.9s linear infinite;
}

@keyframes tbdlp-spin {
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes tbdlp-availability-sweep {
  0% { background-position: -90px 0, 0 0; }
  70% { background-position: 230px 0, 0 0; }
  100% { background-position: 230px 0, 0 0; }
}

.tbdlp__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.tbdlp__noscript {
  text-align: left;
}

.tbdlp__noscript p {
  margin: 0 0 0.5rem;
}

.tbdlp__noscript ul {
  margin: 0;
  padding-left: 1.25rem;
}

.tbdlp__noscript a {
  color: var(--tbdlp-primary-hover);
}

.tbdlp__form-panel[hidden],
.tbdlp__loading[hidden],
.tbdlp__calendar[hidden],
.tbdlp__error[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .tbdlp__panel {
    padding: 1rem;
  }

  .tbdlp__form-panel {
    min-height: 540px;
    padding: 1rem;
  }

  .tbdlp__form-panel::after {
    inset: 0;
    opacity: 0.55;
    filter: blur(7px);
    transform: scale(1.08);
  }

  .tbdlp__form-card {
    width: 100%;
  }

  .tbdlp__iframe-wrap {
    min-height: 750px;
  }

  .tbdlp__iframe-wrap iframe {
    min-height: 750px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tbdlp__spinner {
    animation-duration: 3s;
  }

  .tbdlp__availability-mark span {
    animation-duration: 3s;
  }
}
