/* GovFeeds — Book a call
   Standalone booking widget. Brand-matched to govfeeds.com.
   No framework, no build step. */

:root {
  /* Brand palette */
  --navy: #0E2438;
  --navy-dark: #06192C;
  --teal: #1E7A8C;
  --teal-dark: #155964;
  --teal-light: #2fa5bd;
  --paper: #F8F5EC;
  --paper2: #EEE7D4;
  --gold: #B89968;
  --gold-bright: #D9B57F;
  --text: #1a2332;
  --muted: #5a6573;
  --border: #e0d8c5;
  --good: #2B6E4F;
  --bad: #9b3030;
  --logo-cyan: #BFDCDC;

  --radius: 8px;
  --card-radius: 14px;
  --shadow: 0 6px 24px rgba(14, 36, 56, 0.10), 0 1px 2px rgba(14, 36, 56, 0.06);
  --ring: 0 0 0 3px rgba(30, 122, 140, 0.35);
}

* { box-sizing: border-box; }

/* Make [hidden] win even when an element sets its own display (e.g. grid/flex). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Header ----------------------------------------------------------- */
.site-header {
  background: var(--logo-cyan);
  border-bottom: 1px solid rgba(14, 36, 56, 0.10);
}
.brandbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  height: 32px;   /* wordmark is ~3:1; constrain height, auto width */
  width: auto;
  display: block;
}
.brand-word {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}

/* ---- Page + card ------------------------------------------------------ */
.page {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 560px;
  padding: 32px;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 6px;
  color: var(--navy);
  letter-spacing: -0.2px;
}
.subhead {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 1rem;
}

/* ---- Blocks ----------------------------------------------------------- */
.block {
  margin-top: 26px;
  border: 0;
  padding: 0;
}
fieldset.block { min-width: 0; }   /* allow flex children to shrink */
.block-title {
  display: block;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  margin: 0 0 12px;
  padding: 0;
}
legend.block-title { margin-bottom: 12px; }

/* ---- Status / errors -------------------------------------------------- */
.status {
  margin-top: 16px;
  font-size: 0.95rem;
  min-height: 0;
}
.status:empty { margin-top: 0; }
.status.error,
.status.conflict {
  background: #fdecec;
  border: 1px solid #f1c9c9;
  color: var(--bad);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.status.info {
  background: var(--paper2);
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 10px 14px;
}

/* ---- Rep toggle + cards ----------------------------------------------- */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
}
.toggle input { width: 16px; height: 16px; accent-color: var(--teal); }

.rep-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.rep-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.rep-card:hover { border-color: var(--teal-light); }
.rep-card[aria-checked="true"] {
  border-color: var(--teal);
  background: #effbfd;
  box-shadow: inset 0 0 0 1px var(--teal);
}
.rep-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 34px;
  object-fit: cover;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}
.rep-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

/* ---- Time zone -------------------------------------------------------- */
.tz-select {
  width: 100%;
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}
.tz-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---- Day strip -------------------------------------------------------- */
.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.day-btn {
  flex: 0 0 auto;
  min-width: 60px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  transition: border-color .12s ease, background .12s ease;
}
.day-btn:hover { border-color: var(--teal-light); }
.day-btn[aria-selected="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.day-btn .dow { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .4px; opacity: .85; }
.day-btn .dnum { display: block; font-size: 1.05rem; font-weight: 700; }
.day-btn .mon { display: block; font-size: 0.7rem; opacity: .8; }

/* ---- Slots ------------------------------------------------------------ */
.slots {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.slot-btn {
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  background: #fff;
  border-radius: var(--radius);
  padding: 9px 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.slot-btn:hover { background: #effbfd; }
.slot-btn[aria-selected="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.slots-loading {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 0;
}
.empty-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0 0;
}

/* ---- Detail fields ---------------------------------------------------- */
.details { margin-top: 26px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 5px;
}
.field input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}
.field input[aria-invalid="true"] { border-color: var(--bad); }
.field-error {
  display: block;
  color: var(--bad);
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 0;
}

/* ---- Turnstile -------------------------------------------------------- */
.turnstile-host { min-height: 0; }

/* ---- Recap + submit --------------------------------------------------- */
.pick-recap {
  margin: 22px 0 0;
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--paper2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.pick-recap strong { color: var(--teal-dark); }

.btn-primary {
  margin-top: 18px;
  width: 100%;
  background: var(--gold);
  color: var(--navy);
  border: 0;
  border-radius: var(--radius);
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .08s ease, background .12s ease, box-shadow .12s ease;
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 153, 104, 0.35);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

/* Secondary action: plain teal text link, underline on hover. */
.link-teal {
  display: inline-block;
  color: var(--teal);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.link-teal:hover { text-decoration: underline; }

/* ---- Spinner ---------------------------------------------------------- */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(14, 36, 56, 0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Success screen --------------------------------------------------- */
.success { text-align: left; }
.success .check {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.success h2 { color: var(--navy); margin: 0 0 6px; font-size: 1.35rem; }
.success .detail-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  border-top: 1px solid var(--border);
}
.success .detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.success .detail-list .k { color: var(--muted); }
.success .detail-list .v { font-weight: 600; color: var(--navy); text-align: right; }
.success .join-link { margin-top: 6px; }
.success .invite-note { color: var(--muted); font-size: 0.9rem; margin-top: 16px; }

/* ---- Focus visibility (accessibility) --------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.rep-card:focus-visible,
.day-btn:focus-visible,
.slot-btn:focus-visible,
.toggle input:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius);
}

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 22px 16px;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 600px) {
  .page { padding: 24px 12px; }
  .card { padding: 22px; }
  h1 { font-size: 1.4rem; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .rep-list { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .spinner { animation: spin .7s linear infinite; } /* keep spinner meaningful */
}
