/* =========================================================================
   MyUrologyCare — GU Trial & Treatment Matcher (clinician tool)
   Layers on top of base.css; reuses the shared design tokens. Denser and
   more utilitarian than the patient pages (this is a clinician workspace),
   but visually consistent.
   ========================================================================= */

/* The `hidden` attribute must win over author `display:flex`/`grid` rules
   below (e.g. .actions, .tm-field), which otherwise defeat the UA default. */
[hidden] { display: none !important; }

/* Clinician notice bar — distinct from the patient disclaimer banner */
.clinician-banner {
  background: var(--blue-soft);
  border-bottom: 1px solid #bcd4e6;
}
.clinician-banner .wrap {
  padding-top: .7rem;
  padding-bottom: .7rem;
}
.clinician-banner p { margin: 0; font-size: .95rem; color: var(--ink); }
.clinician-banner strong { color: var(--blue-dark); }
.clinician-banner strong + strong,
.clinician-banner strong:last-of-type { color: var(--alert-ink); }

.phi-note { background: var(--blue-soft); border-color: #bcd4e6; }

/* ---------- Form ---------- */
.tm-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1rem 1.1rem 1.1rem;
  margin: 1rem 0;
}
.tm-fieldset > legend {
  font-weight: 700;
  color: var(--blue-dark);
  padding: 0 .4rem;
}

.tm-radio-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.tm-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 2px solid var(--line); border-radius: 999px;
  padding: .5rem .9rem; min-height: 44px; cursor: pointer;
  font-weight: 600;
}
.tm-pill:hover { border-color: var(--blue); background: var(--blue-soft); }
.tm-pill input { accent-color: var(--blue); }

.tm-grid {
  display: grid; grid-template-columns: 1fr; gap: .85rem;
}
@media (min-width: 620px) {
  .tm-grid { grid-template-columns: 1fr 1fr; }
}
.tm-field { display: flex; flex-direction: column; gap: .3rem; }
.tm-field > span { font-weight: 600; font-size: .95rem; color: var(--ink); }
.tm-field select,
.tm-field input,
.tm-field textarea {
  min-height: 44px; padding: .5rem .6rem;
  border: 2px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; color: var(--ink); width: 100%;
}
.tm-field textarea { min-height: auto; resize: vertical; line-height: 1.4; }
.tm-field input[readonly] { background: var(--paper); color: var(--ink-soft); }
.tm-field select:focus,
.tm-field input:focus,
.tm-field textarea:focus { outline: none; border-color: var(--blue); }

/* Admin: cross-tool nav */
.tm-admin-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin: .25rem 0 1rem; font-weight: 600;
}
.tm-admin-nav a { text-decoration: none; color: var(--blue-dark); }
.tm-admin-nav a:hover { text-decoration: underline; }
.tm-admin-nav a[aria-current="page"] { color: var(--ink); text-decoration: none; cursor: default; }
.tm-admin-nav span { color: var(--ink-soft); }

/* Admin: name-search result picker */
.tm-admin-results { list-style: none; margin: .8rem 0 0; padding: 0; }
.tm-admin-result { margin: 0 0 .5rem; }
.tm-admin-pick {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: .7rem .9rem;
}
.tm-admin-pick:hover { border-color: var(--blue); background: var(--blue-soft); }
.tm-admin-pick strong { display: block; color: var(--blue-dark); }
.tm-admin-meta { font-size: .85rem; color: var(--ink-soft); }

/* Admin: generated-JSON block */
.tm-code {
  background: #1f2933; color: #e8f1f7;
  border-radius: 10px; padding: 1rem; margin: 1rem 0 0;
  overflow-x: auto; font-size: .85rem; line-height: 1.5;
  white-space: pre; -webkit-overflow-scrolling: touch;
}

.tm-check {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 40px; margin: .2rem 1rem .2rem 0; cursor: pointer;
}
.tm-check input { width: 20px; height: 20px; accent-color: var(--blue); }

.tm-checkgroup { margin-top: .9rem; }
.tm-checkgroup-label {
  display: block; font-weight: 600; font-size: .95rem;
  margin-bottom: .3rem; color: var(--ink);
}

/* First-Urology-only search option (before the search button) */
.tm-search-opts {
  background: var(--blue-soft);
  border: 1px solid #bcd4e6;
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin: 1rem 0;
}
.tm-check-em { font-weight: 700; margin: 0; }
.tm-check-em input { width: 20px; height: 20px; accent-color: var(--blue); }
.tm-opt-hint { margin: .35rem 0 0 1.9rem; font-size: .9rem; color: var(--ink-soft); }

.tm-status { min-height: 1.4rem; font-weight: 600; margin: .5rem 0 0; }
.tm-status-ok { color: var(--green); }
.tm-status-err { color: var(--alert-ink); }

/* ---------- Results ---------- */
.tm-results { margin-top: 1.5rem; }

.tm-summary {
  background: var(--green-soft); border: 1px solid #bcd9c8;
  border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 1.25rem;
}
.tm-summary p:last-child { margin-bottom: 0; }
.tm-degraded { background: var(--note-soft); border-color: var(--note-line); }
.tm-ai-pending { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.tm-ai-pending p { margin: 0; }

.tm-section-title { font-size: 1.25rem; margin: 0 0 .3rem; }
.tm-count { color: var(--ink-soft); font-weight: 400; font-size: 1rem; }

/* ---------- NCCN guideline context (shown before the trial sections) ---------- */
.tm-guideline {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}
.tm-guideline-lead { margin: .3rem 0 .8rem; }
.tm-guideline-btn { display: inline-block; }
.tm-guideline-cap { margin: .6rem 0 0; font-size: .9rem; color: var(--ink-soft); }

.tm-block { margin: 1.5rem 0; }
.tm-block-first {
  background: var(--blue-soft);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.tm-block-first .tm-section-title { color: var(--blue-dark); }
.tm-block-tx { border-top: 2px dashed var(--line); padding-top: 1rem; }

.tm-scope, .tm-empty { color: var(--ink-soft); font-size: .95rem; }
.tm-empty { font-style: italic; }

/* ---------- Cards ---------- */
.tm-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin: .8rem 0;
}
.tm-card-first { border-left-color: var(--blue); }
.tm-card-regional { border-left-color: var(--green); }
.tm-card-ctgov { border-left-color: #8a7bbf; }
.tm-treatment { border-left-color: var(--green); }

.tm-card-head h3 { margin: 0; font-size: 1.12rem; }

.tm-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .4rem; }
.tm-badge {
  font-size: .75rem; font-weight: 700;
  background: var(--blue-soft); color: var(--blue-dark);
  border: 1px solid #bcd4e6; border-radius: 999px;
  padding: .12rem .6rem; white-space: nowrap;
}
.tm-tier { background: #eee9f5; color: #5b4b8a; border-color: #cabfe6; }
.tm-approved { background: var(--green-soft); color: var(--green); border-color: #bcd9c8; }
.tm-rel-high { background: var(--green-soft); color: var(--green); border-color: #bcd9c8; }
.tm-rel-moderate { background: var(--note-soft); color: #8a5300; border-color: var(--note-line); }
.tm-rel-low, .tm-rel-unlikely { background: #f1eeea; color: var(--ink-soft); border-color: var(--line); }

.tm-meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: .2rem 0 .5rem; font-size: .95rem; }
.tm-nct { font-weight: 700; }
.tm-site { color: var(--ink-soft); }

.tm-elig h4, .tm-concerns h4, .tm-refs h4 {
  margin: .6rem 0 .2rem; font-size: .9rem; color: var(--blue-dark);
}
.tm-concerns h4 { color: var(--alert-ink); }
.tm-list { margin: .1rem 0 0; padding-left: 1.2rem; }
.tm-list li { margin: .2rem 0; }
.tm-snip { font-size: .9rem; color: var(--ink-soft); margin: .2rem 0 0; }

.tm-fit {
  background: var(--green-soft); border: 1px solid #bcd9c8;
  border-radius: 10px; padding: .55rem .75rem; margin: .6rem 0 0; font-size: .95rem;
}
.tm-concerns {
  background: var(--alert-soft); border: 1px solid var(--alert-line);
  border-radius: 10px; padding: .5rem .75rem .6rem; margin: .6rem 0 0;
}
.tm-concerns .tm-list li { color: var(--alert-ink); }

/* Documentation pearls on treatment cards — charting reminders */
.tm-pearls {
  background: #fdf6e3; border: 1px solid #e6d9a8;
  border-radius: 10px; padding: .5rem .75rem .6rem; margin: .6rem 0 0;
}
.tm-pearls h4 { margin: .1rem 0 .2rem; font-size: .9rem; color: #8a6d3b; }

.tm-mech { color: var(--ink-soft); font-size: .92rem; margin: .3rem 0 0; }
.tm-contact { font-size: .9rem; color: var(--ink-soft); margin: .55rem 0 0; }
.tm-refs .tm-list { word-break: break-all; }

.tm-disclaimer { margin-top: 1.5rem; }
.tm-disclaimer .tm-list li { margin: .35rem 0; }

.tm-footer-note { margin-top: 2rem; }

/* ---------- Browse-all-trials section (bottom of page) ---------- */
.tm-browse {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 2px dashed var(--line);
}
.tm-browse h2 { margin: 0 0 .3rem; font-size: 1.25rem; }
.tm-browse .actions { margin: .75rem 0; }

/* Collapsed trial thumbnail: title only; click the title to expand full details. */
.tm-thumb {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: .6rem 0;
  overflow: hidden;
}
.tm-thumb-first { border-left-color: var(--blue); }
.tm-thumb-regional { border-left-color: var(--green); }
.tm-thumb-ctgov { border-left-color: #8a7bbf; }
.tm-thumb-tx { border-left-color: #b8860b; }

.tm-thumb-toggle {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  text-align: left; cursor: pointer;
  background: transparent; border: 0;
  padding: .9rem 1.1rem; min-height: 44px;
  font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--ink);
}
.tm-thumb-toggle:hover { background: var(--blue-soft); }
.tm-thumb-title, .tm-browse-title { flex: 1; }
.tm-thumb-chev {
  flex: none; display: inline-flex; color: var(--blue);
  transition: transform .15s ease;
}
.tm-thumb.is-open .tm-thumb-chev { transform: rotate(180deg); }

.tm-thumb-body { padding: 0 1.1rem 1.1rem; }
.tm-thumb-body > .tm-badges:first-child { margin-top: 0; }
