/* The form + calendar widget on the landing page.
   Uses the colour tokens (--bg, --accent...) defined in index.html. */

.sch-section { max-width: 980px; margin: 0 auto; padding: 0 24px 80px; scroll-margin-top: 16px; }

.sch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.sch-card::before { content: ''; display: block; height: 2px; background: var(--accent); }

/* ── Two-step bar ── */
.sch-tabs {
  display: flex; justify-content: center; gap: 28px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.04em;
}
.sch-tab { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.sch-tab::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #333; }
.sch-tab.active { color: var(--text); }
.sch-tab.active::before { background: var(--accent); }
.sch-tab.done::before { background: var(--accent); opacity: 0.45; }

.sch-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sch-form { padding: 30px 28px; border-right: 1px solid var(--border); min-height: 470px; display: flex; flex-direction: column; }
.sch-cal { position: relative; padding: 30px 28px; min-height: 470px; }

/* ── Form side ── */
.sch-progress { height: 3px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 26px; }
.sch-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s ease; }

.sch-panel { display: none; flex: 1; flex-direction: column; }
.sch-panel.active { display: flex; animation: schIn 0.25s ease; }
@keyframes schIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sch-panel.active { animation: none; } }

.sch-title {
  font-family: 'Syne', sans-serif; font-size: clamp(18px, 2vw, 21px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 20px; text-wrap: balance;
}
.sch-kicker {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--accent); margin-bottom: 10px; min-height: 17px;
}
.sch-eligible { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sch-eligible .sch-check { margin-bottom: 0; }
.sch-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: rgba(200, 245, 62, 0.07); border: 1px solid rgba(200, 245, 62, 0.25);
  border-radius: 999px; padding: 7px 14px;
}
.sch-sub { color: var(--muted); font-size: 14px; margin: -12px 0 20px; }

.sch-fields { display: flex; flex-direction: column; gap: 14px; }
.sch-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sch-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sch-field label {
  font-size: 12px; font-family: 'JetBrains Mono', monospace; color: var(--muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.sch-field input, .sch-field select {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: 13px 14px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 16px;
  outline: none; transition: border-color 0.15s; width: 100%; min-width: 0;
}
.sch-field input::placeholder { color: var(--muted); opacity: 0.6; }
.sch-field input:focus, .sch-field select:focus { border-color: rgba(200, 245, 62, 0.5); }
.sch-phone { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.sch-phone select { padding-left: 12px; padding-right: 4px; font-variant-numeric: tabular-nums; }
.sch-tip { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.sch-consent { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 14px; }
.sch-consent a { color: var(--muted); text-decoration: underline; }

.sch-options { display: flex; flex-direction: column; gap: 10px; }
.sch-option {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; background: var(--surface2); border: 1px solid var(--border); border-radius: 9px;
  cursor: pointer; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
}
.sch-option::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #3a3a3a; transition: border-color 0.15s, box-shadow 0.15s; }
.sch-option:hover { border-color: rgba(200, 245, 62, 0.35); }
.sch-option.selected { border-color: var(--accent); background: rgba(200, 245, 62, 0.06); }
.sch-option.selected::before { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--accent); }

.sch-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 22px; }
.sch-back { background: none; border: none; color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 14px; cursor: pointer; padding: 0; }
.sch-back:hover { color: var(--text); }
.sch-btn {
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  background: var(--accent); color: #0b0b0b; border: none; border-radius: 8px;
  padding: 14px 28px; cursor: pointer; transition: opacity 0.15s, transform 0.1s; margin-left: auto;
}
.sch-btn.full { width: 100%; margin: 20px 0 0; }
.sch-btn:hover:not(:disabled) { opacity: 0.9; }
.sch-btn:active:not(:disabled) { transform: scale(0.99); }
.sch-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.sch-error { display: none; font-size: 13px; color: #ff6b6b; margin-top: 12px; }

.sch-option:focus-visible, .sch-btn:focus-visible, .sch-back:focus-visible, .sch-day:focus-visible, .sch-time:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* done / disqualified panels */
.sch-check {
  width: 48px; height: 48px; border-radius: 50%; margin-bottom: 18px;
  background: rgba(200, 245, 62, 0.1); border: 1px solid rgba(200, 245, 62, 0.3);
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px;
}
.sch-summary { list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 14px; }
.sch-summary li { display: flex; gap: 10px; }
.sch-summary li::before { content: '\2713'; color: var(--accent); }
.sch-panel p.sch-text { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin-bottom: 12px; }
.sch-panel p.sch-text strong { color: var(--accent); font-weight: 500; }

/* ── Calendar side ── */
.sch-cal-inner { transition: filter 0.4s ease, opacity 0.4s ease; }
.sch-cal.locked .sch-cal-inner { filter: blur(4px); opacity: 0.7; pointer-events: none; user-select: none; }
.sch-lock {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px;
}
.sch-cal.locked .sch-lock { display: flex; }
.sch-lock span {
  background: var(--surface2); border: 1px solid #2a2a2a; border-radius: 10px;
  padding: 16px 20px; max-width: 250px; text-align: center; font-size: 14.5px; line-height: 1.5;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sch-label {
  font-size: 12px; font-family: 'JetBrains Mono', monospace; color: var(--muted);
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.sch-tz { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 5px 8px; max-width: 58%; outline: none; }
.sch-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin-bottom: 22px; }
.sch-day {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 0;
  text-align: center; cursor: pointer; color: var(--text); font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s, background 0.15s;
}
.sch-day:hover { border-color: rgba(200, 245, 62, 0.35); }
.sch-day .dow, .sch-day .mon { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sch-day .num { display: block; font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; line-height: 1.3; }
.sch-day.selected { background: rgba(200, 245, 62, 0.08); border-color: var(--accent); }
.sch-day.selected .dow, .sch-day.selected .mon { color: var(--accent); }

.sch-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 236px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.sch-time {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 11px 4px;
  cursor: pointer; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14.5px;
  font-variant-numeric: tabular-nums; transition: border-color 0.15s, background 0.15s;
}
.sch-time:hover { border-color: rgba(200, 245, 62, 0.35); }
.sch-time.selected { background: var(--accent); border-color: var(--accent); color: #0b0b0b; font-weight: 500; }

.sch-state { color: var(--muted); font-size: 14px; text-align: center; padding: 60px 10px; }
.sch-state strong { display: block; color: var(--text); font-family: 'Syne', sans-serif; font-size: 16px; margin-bottom: 6px; }
.sch-state a, .sch-help a { color: var(--accent); }
.sch-help { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ── Mobile: form first, calendar underneath ── */
@media (max-width: 760px) {
  .sch-section { padding: 0 16px 56px; }
  .sch-body { grid-template-columns: minmax(0, 1fr); }
  .sch-form, .sch-cal { min-width: 0; }
  .sch-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sch-form { border-right: none; border-bottom: 1px solid var(--border); padding: 22px 16px; min-height: 0; }
  .sch-cal { padding: 22px 16px; min-height: 0; }
  .sch-cal.locked { max-height: 230px; overflow: hidden; }
  .sch-tabs { gap: 16px; font-size: 11px; }
  .sch-nav { padding-top: 20px; }
  .sch-btn { flex: 1; }
}

/* ── "You're eligible" screen: note + arrow towards the calendar ── */
.sch-note {
  margin-top: 20px; padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--text);
  background: rgba(200, 245, 62, 0.05); border: 1px solid rgba(200, 245, 62, 0.22); border-radius: 9px;
}
.sch-note strong { color: var(--accent); font-weight: 500; }
.sch-pointer {
  margin-top: auto; padding-top: 22px; display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px;
  color: var(--accent);
}
.sch-pointer span { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; padding-bottom: 20px; }
.sch-pointer svg { width: 132px; height: auto; flex: none; animation: schNudge 1.4s ease-in-out infinite; }
@keyframes schNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .sch-pointer svg { animation: none; } }
@media (max-width: 760px) {
  /* calendar is underneath on phones, so the arrow points down */
  .sch-pointer { justify-content: center; padding-top: 18px; }
  .sch-pointer span { padding-bottom: 6px; }
  .sch-pointer svg { width: 84px; transform: rotate(70deg); animation: none; }
}

/* ── Phone-size refinements ── */
@media (max-width: 760px) {
  .sch-title { font-size: 19px; }
  .sch-option { padding: 15px 14px; font-size: 15.5px; }
  .sch-back { padding: 12px 12px 12px 0; }            /* bigger tap target */
  .sch-times { max-height: none; overflow: visible; }  /* no scroll-inside-scroll */
  .sch-time { padding: 13px 4px; font-size: 15px; }
  .sch-days { grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); }
  .sch-tz { max-width: 54%; font-size: 12px; padding: 7px 8px; }
  .sch-label { font-size: 11.5px; }
  .sch-lock span { font-size: 14px; }
  .sch-kicker { font-size: 11px; }
}
