/* TrialBoost patient trial finder.
   Palette is navy-biased neutrals off the TrialBoost brand, with amber reserved
   solely as the semantic marker for sponsored placement and green for recruiting
   status. Amber is never used decoratively: if it is on the page, it means paid. */
.tbt{
  --ink:#14213A; --ink-2:#4A5568; --ink-3:#77839A;
  --navy:#13294B; --steel:#5C93C4; --steel-2:#7BAFD4; --steel-wash:#EAF2F9;
  --paper:#FCFBF9; --surface:#FFFFFF; --line:#E2E6EE; --line-2:#CFD6E2;
  --sponsor:#8A5B12; --sponsor-bg:#FDF6E7; --sponsor-line:#E4C583;
  --go:#1B6B4F; --go-bg:#EAF5F0;
  --radius:10px;
  --ui:"Public Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --display:"Newsreader",Georgia,"Times New Roman",serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-family:var(--ui); color:var(--ink); line-height:1.6;
  background:var(--paper);
}
.tbt *,.tbt *::before,.tbt *::after{box-sizing:border-box}
.tbt button,.tbt input,.tbt select{font:inherit;color:inherit}

/* ---------- search bar ---------- */
.tbt-search{background:var(--navy);padding:26px 18px;border-radius:var(--radius)}
.tbt-search h2{font-family:var(--display);font-weight:600;font-size:26px;line-height:1.25;
  color:#fff;margin:0 0 6px;text-wrap:balance}
.tbt-search p{color:#B9CCE2;margin:0 0 18px;font-size:14.5px;max-width:58ch}
.tbt-fields{display:grid;grid-template-columns:2fr 1fr auto;gap:10px}
@media(max-width:720px){.tbt-fields{grid-template-columns:1fr}}
.tbt-field label{display:block;font-size:11px;font-weight:700;letter-spacing:.08em;
  text-transform:uppercase;color:#9FB8D4;margin-bottom:5px}
.tbt-field input{width:100%;padding:12px 13px;border:1px solid transparent;border-radius:8px;
  background:#fff;color:var(--ink)}
.tbt-field input:focus{outline:none;border-color:var(--steel-2);box-shadow:0 0 0 3px rgba(123,175,212,.35)}
.tbt-go{align-self:end}
.tbt-go button{padding:12px 26px;border:none;border-radius:8px;background:var(--steel-2);
  color:var(--navy);font-weight:700;cursor:pointer;white-space:nowrap}
.tbt-go button:hover{background:#96c3e0}
.tbt-go button:disabled{opacity:.6;cursor:wait}

/* ---------- chips ---------- */
.tbt-quick{display:flex;flex-wrap:wrap;gap:7px;margin-top:16px;align-items:center}
.tbt-quick span{font-size:12px;color:#9FB8D4;margin-right:2px}
.tbt-quick button{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2);
  color:#DCE8F4;padding:5px 11px;border-radius:99px;font-size:12.5px;cursor:pointer}
.tbt-quick button:hover{background:rgba(255,255,255,.2)}

/* ---------- filters ---------- */
.tbt-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;
  padding:14px 2px;border-bottom:1px solid var(--line)}
.tbt-filters select{padding:7px 10px;border:1px solid var(--line-2);border-radius:7px;
  background:var(--surface);font-size:13.5px}
.tbt-count{margin-left:auto;font-size:13.5px;color:var(--ink-2)}
.tbt-count b{color:var(--ink);font-variant-numeric:tabular-nums}

/* ---------- result rows ---------- */
.tbt-results{display:flex;flex-direction:column;gap:12px;padding:18px 0}
.tbt-row{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px 20px;cursor:pointer;transition:border-color .12s,box-shadow .12s}
.tbt-row:hover{border-color:var(--steel);box-shadow:0 2px 10px rgba(19,41,75,.07)}
.tbt-row.is-sponsored{border-left:3px solid var(--sponsor-line);background:var(--sponsor-bg)}
.tbt-row h3{font-family:var(--display);font-size:19px;font-weight:600;line-height:1.3;
  margin:0 0 8px;color:var(--navy);text-wrap:balance}
.tbt-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;align-items:center}
.tbt-tag{font-size:11.5px;font-weight:600;padding:3px 9px;border-radius:99px;
  border:1px solid var(--line-2);color:var(--ink-2);background:var(--paper)}
.tbt-tag.go{background:var(--go-bg);border-color:#BEDFD0;color:var(--go)}
.tbt-tag.spon{background:#fff;border-color:var(--sponsor-line);color:var(--sponsor);font-weight:700}
.tbt-tag.phase{background:var(--steel-wash);border-color:#C5DCEE;color:#1F5A8A}
.tbt-sum{font-size:14.5px;color:var(--ink-2);margin:0 0 12px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tbt-foot{display:flex;flex-wrap:wrap;gap:16px;font-size:13px;color:var(--ink-3);
  padding-top:11px;border-top:1px solid var(--line)}
.tbt-foot b{color:var(--ink);font-weight:600}
.tbt-dist{font-variant-numeric:tabular-nums}

/* ---------- disclosure ---------- */
.tbt-why{background:var(--surface);border:1px dashed var(--sponsor-line);border-radius:8px;
  padding:11px 14px;font-size:12.5px;color:var(--ink-2);margin-bottom:4px}
.tbt-why b{color:var(--sponsor)}

/* ---------- detail ---------- */
.tbt-back{background:none;border:none;color:var(--steel);font-weight:600;cursor:pointer;
  padding:0;margin-bottom:16px;font-size:14px}
.tbt-back:hover{text-decoration:underline}
.tbt-detail{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:28px;margin-bottom:18px}
@media(max-width:600px){.tbt-detail{padding:20px}}
.tbt-detail h2{font-family:var(--display);font-size:27px;font-weight:600;line-height:1.24;
  margin:0 0 12px;color:var(--navy);text-wrap:balance}
.tbt-detail h4{font-family:var(--ui);font-size:12px;font-weight:700;letter-spacing:.09em;
  text-transform:uppercase;color:var(--ink-3);margin:26px 0 9px}
.tbt-detail p{margin:0 0 12px;font-size:15px}
.tbt-detail ul{margin:0 0 12px;padding-left:20px;font-size:14.5px;color:var(--ink-2)}
.tbt-detail li{margin:5px 0}
.tbt-nct{font-family:var(--mono);font-size:12.5px;color:var(--ink-3)}

/* phase ladder: shows where this trial sits in the research sequence */
.tbt-ladder{display:flex;gap:3px;margin:6px 0 4px}
.tbt-rung{flex:1;padding:9px 6px;text-align:center;font-size:11px;font-weight:600;
  background:var(--paper);border:1px solid var(--line);color:var(--ink-3);border-radius:5px}
.tbt-rung.on{background:var(--navy);border-color:var(--navy);color:#fff}
.tbt-rung small{display:block;font-weight:400;font-size:10px;opacity:.75;margin-top:2px}
.tbt-ladder-note{font-size:13px;color:var(--ink-2);margin:8px 0 0}

.tbt-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:1px;background:var(--line);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.tbt-fact{background:var(--surface);padding:13px 15px}
.tbt-fact dt{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--ink-3);margin-bottom:3px}
.tbt-fact dd{margin:0;font-size:15px;font-weight:600;color:var(--ink)}

.tbt-site{display:flex;justify-content:space-between;gap:14px;padding:11px 0;
  border-bottom:1px solid var(--line);font-size:14px}
.tbt-site:last-child{border-bottom:none}
.tbt-site .n{font-weight:600}
.tbt-site .c{color:var(--ink-3);font-size:13px}
.tbt-site .d{color:var(--steel);font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}

/* ---------- interest form ---------- */
.tbt-cta{background:var(--navy);border-radius:var(--radius);padding:26px;color:#fff}
.tbt-cta h3{font-family:var(--display);font-size:22px;font-weight:600;margin:0 0 6px;color:#fff}
.tbt-cta p{color:#B9CCE2;font-size:14px;margin:0 0 18px;max-width:60ch}
.tbt-cta .grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
@media(max-width:600px){.tbt-cta .grid{grid-template-columns:1fr}}
.tbt-cta input[type=text],.tbt-cta input[type=email],.tbt-cta input[type=tel]{
  width:100%;padding:11px 12px;border:1px solid transparent;border-radius:7px;background:#fff}
.tbt-cta label.f{display:block;font-size:11px;font-weight:700;letter-spacing:.07em;
  text-transform:uppercase;color:#9FB8D4;margin-bottom:5px}
.tbt-consent{display:flex;gap:10px;align-items:flex-start;background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.14);border-radius:8px;padding:13px;margin-top:13px}
.tbt-consent input{margin:3px 0 0;flex:none;width:16px;height:16px;accent-color:var(--steel-2)}
.tbt-consent span{font-size:12.5px;line-height:1.55;color:#DCE8F4}
.tbt-consent.bad{border-color:#E08A8A;background:rgba(224,138,138,.12)}
.tbt-submit{margin-top:15px;padding:13px 28px;border:none;border-radius:8px;
  background:var(--steel-2);color:var(--navy);font-weight:700;cursor:pointer}
.tbt-submit:hover{background:#96c3e0}
.tbt-note{font-size:11.5px;color:#8FA8C4;margin-top:12px;line-height:1.6}

/* ---------- states ---------- */
.tbt-state{text-align:center;padding:52px 20px;color:var(--ink-3)}
.tbt-state h3{font-family:var(--display);font-size:20px;color:var(--ink);margin:0 0 7px;font-weight:600}
.tbt-spin{width:26px;height:26px;border:2.5px solid var(--line-2);border-top-color:var(--steel);
  border-radius:50%;margin:0 auto 14px;animation:tbtspin .8s linear infinite}
@keyframes tbtspin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.tbt-spin{animation-duration:2.4s}}
.tbt-more{display:block;width:100%;padding:13px;border:1px solid var(--line-2);
  border-radius:8px;background:var(--surface);color:var(--steel);font-weight:700;cursor:pointer}
.tbt-more:hover{background:var(--steel-wash)}
.tbt-src{font-size:12px;color:var(--ink-3);padding:18px 2px 4px;border-top:1px solid var(--line);margin-top:8px}
.tbt-src a{color:var(--steel)}

/* ---------------------------------------------------------------- host page
 * The Medicate theme puts a 362px page-title banner (.pt-breadcrumb) above the
 * content on every page. On the trial finder that pushes the search box below
 * the fold, which is the one thing a patient must see first. Suppressed only on
 * pages that actually carry the shortcode, so the rest of the site is untouched.
 */
body.tbt-page .pt-breadcrumb{display:none!important}
body.tbt-page #content,
body.tbt-page .site-content-contain{padding-top:0!important}
body.tbt-page .entry-content{margin-top:0!important}
body.tbt-page #primary,
body.tbt-page .peacefulthemes-contain-area{padding-top:28px!important}
/* the theme's two-column page layout would otherwise squeeze the finder */
body.tbt-page #primary.content-area{width:100%!important;max-width:100%!important;flex:0 0 100%!important}
body.tbt-page #secondary,
body.tbt-page .widget-area{display:none!important}

/* ---------------------------------------------------------------- host theme
 * The Medicate theme styles every form control on the page and pads its main
 * region for a marketing layout. On the trial finder that produces a 130px band
 * of nothing above the fold and filter dropdowns stretched to full width, which
 * breaks the filter row onto four lines. These rules are scoped to body.tbt-page
 * so they only apply where our shortcode is rendering, and they use !important
 * because the theme's own rules do.
 */
body.tbt-page #main.site-main{padding-top:26px!important;padding-bottom:56px!important}

body.tbt-page .tbt-filters{row-gap:10px}
body.tbt-page .tbt-filters label{width:auto!important;margin:0 2px 0 0!important;
  font-size:12px!important;font-weight:600!important;letter-spacing:.04em;
  text-transform:uppercase;color:var(--ink-3)!important;line-height:1!important}
body.tbt-page .tbt-filters select{width:auto!important;min-width:132px;max-width:220px;
  height:auto!important;min-height:0!important;margin:0 14px 0 0!important;
  padding:7px 28px 7px 10px!important;font-size:13.5px!important;line-height:1.3!important;
  border:1px solid var(--line-2)!important;border-radius:7px!important;
  background-color:var(--surface)!important;box-shadow:none!important;color:var(--ink)!important}
body.tbt-page .tbt-filters select:focus{outline:2px solid var(--steel);outline-offset:1px}

/* Shown for the moment between arriving on a ?nct deep link and the study
   appearing. Brief, but a blank panel reads as broken. */
.tbt-loading{padding:34px 0;color:var(--ink-3);font-size:14.5px}
