/* ============================================================
   RAR MEDICAL MICROBIOLOGY · Pharyngitis Feature-Picker chrome
   Scoped to .rar-topic-content .phxfp. Reuses the page's canonical
   tokens (accent #0a84ff, card radii, #111 reader text) so the picker
   reads as native chrome, not a foreign widget. Logic/data live in
   feature-picker.js and are untouched by styling.
   ============================================================ */

.rar-topic-content .phxfp { color: #111111; }

.rar-topic-content .phxfp__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 20px;
    align-items: start;
}
@media (max-width: 860px) {
    .rar-topic-content .phxfp__grid { grid-template-columns: 1fr; }
}

/* ---------- Findings (left): grouped chips ---------- */
.rar-topic-content .phxfp__group { margin-bottom: 16px; }
.rar-topic-content .phxfp__group-label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #5a6473;
}
.rar-topic-content .phxfp__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rar-topic-content .phxfp__chip {
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid rgba(10, 132, 255, 0.28);
    background: rgba(240, 247, 255, 0.7);
    color: #111111;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rar-topic-content .phxfp__chip:hover { border-color: rgba(10, 132, 255, 0.55); }
.rar-topic-content .phxfp__chip.is-on {
    background: var(--accent, #0a84ff);
    border-color: var(--accent, #0a84ff);
    color: #fff;
}

/* ---------- Bugs (right): live differential ---------- */
.rar-topic-content .phxfp__bugs {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(238, 245, 255, 0.75), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(10, 132, 255, 0.16);
    position: sticky;
    top: 12px;
}
.rar-topic-content .phxfp__bugs-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.rar-topic-content .phxfp__bugs-title { font-size: 13px; font-weight: 850; color: #111111; }
.rar-topic-content .phxfp__reset {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: #fff;
    color: #111111;
    font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.rar-topic-content .phxfp__reset:hover { background: rgba(15, 23, 42, 0.04); }

.rar-topic-content .phxfp__tiles { display: flex; flex-direction: column; gap: 6px; }
.rar-topic-content .phxfp__tile {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #fff;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.rar-topic-content .phxfp__tile-main { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.rar-topic-content .phxfp__tile-name { font-size: 13.5px; font-weight: 800; color: #111111; font-style: italic; }
.rar-topic-content .phxfp__tile-sub { font-size: 11px; color: #6b7280; }
.rar-topic-content .phxfp__tile-status {
    flex: none;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em;
    color: #6b7280;
}

/* category tint (opts.bugs may carry cat: bacterial | viral | fungal) */
.rar-topic-content .phxfp__cat-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 999px;
    margin-right: 6px; vertical-align: 1px; background: #94a3b8;
}
.rar-topic-content .phxfp__tile--cat-bacterial { border-left: 3px solid #0a84ff; }
.rar-topic-content .phxfp__tile--cat-bacterial .phxfp__cat-dot { background: #0a84ff; }
.rar-topic-content .phxfp__tile--cat-viral { border-left: 3px solid #f5a623; }
.rar-topic-content .phxfp__tile--cat-viral .phxfp__cat-dot { background: #f5a623; }
.rar-topic-content .phxfp__tile--cat-fungal { border-left: 3px solid #7c3aed; }
.rar-topic-content .phxfp__tile--cat-fungal .phxfp__cat-dot { background: #7c3aed; }

/* status variants — AND-filter model: match (highlight) · dim (greyed) · out (ruled out) */
.rar-topic-content .phxfp__tile { transition: opacity .18s, background .18s, border-color .18s, filter .18s; }

/* MATCH — fits every selected finding (top match, highlighted) */
.rar-topic-content .phxfp__tile--match {
    border-color: #22a06b;
    background: rgba(34, 160, 107, 0.12);
    box-shadow: 0 0 0 1px rgba(34, 160, 107, 0.35) inset;
}
.rar-topic-content .phxfp__tile--match .phxfp__tile-status { color: #157a4e; }

/* DIM — still possible but doesn't match all selected findings (greyed 0.3) */
.rar-topic-content .phxfp__tile--dim { opacity: 0.35; }

/* OUT — ruled out by a negative association (greyed-out + struck) */
.rar-topic-content .phxfp__tile--out {
    opacity: 0.3;
    filter: grayscale(1);
    background: rgba(15, 23, 42, 0.03);
}
.rar-topic-content .phxfp__tile--out .phxfp__tile-name { text-decoration: line-through; font-style: italic; }
.rar-topic-content .phxfp__tile--out .phxfp__tile-status { color: #b0475e; }

/* ---------- Result banner ---------- */
.rar-topic-content .phxfp__result { margin-top: 14px; }
.rar-topic-content .phxfp__hint { margin: 0; font-size: 13px; line-height: 1.5; color: #5a6473; }
.rar-topic-content .phxfp__banner {
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
}
.rar-topic-content .phxfp__banner--lands {
    border-color: #22a06b;
    background: rgba(34, 160, 107, 0.10);
}
.rar-topic-content .phxfp__banner--leading { border-color: rgba(10, 132, 255, 0.4); background: rgba(232, 243, 255, 0.8); }
.rar-topic-content .phxfp__banner-head {
    display: flex; align-items: center; gap: 7px;
    font-size: 14px; color: #111111;
}
.rar-topic-content .phxfp__banner-head strong { font-weight: 850; font-style: italic; }
.rar-topic-content .phxfp__banner-head em { color: #6b7280; font-style: normal; font-size: 12px; }
.rar-topic-content .phxfp__banner-head svg { color: #157a4e; }
.rar-topic-content .phxfp__banner-support {
    margin: 9px 0 0; padding-left: 18px;
    font-size: 12.5px; line-height: 1.5; color: #111111;
}
.rar-topic-content .phxfp__go {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px;
    font-size: 13px;
}
