/* Shared styles for the guideline calculators (TI-RADS, Bosniak, Fleischner, Lung-RADS, LI-RADS, O-RADS). */
[hidden] { display: none !important; }

/* Tabs (CT/MRI vs US, US vs MRI) */
.g-tabs { display: flex; gap: 6px; justify-content: center; margin: 0 0 18px; }
.g-tabs button { background: #1a1a1a; border: 1px solid #444; color: #ddd; padding: 8px 18px; border-radius: 999px; font-size: 0.92rem; }
.g-tabs button:hover { border-color: #7cc4ff; background: #222; }
.g-tabs button[aria-selected="true"] { background: #0066cc; border-color: #0066cc; color: #fff; }

/* Forms: a fieldset groups related controls; labels sit above on narrow screens.
   The fixed 180px label column comes from calculator.css. */
.calc-form fieldset { border: 1px solid #333; border-radius: 6px; padding: 10px 12px 4px; margin: 0; }
.calc-form legend { color: #aaa; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0 6px; }
.calc-form .form-group + .form-group { margin-top: 10px; }
.form-group .unit { color: #999; font-size: 0.85rem; }
.form-group input[type="number"].short { flex: 0 0 110px; }
.form-group small.help { display: block; color: #999; font-size: 0.78rem; margin-top: 3px; }
.checkbox-grid .group-title { padding: 0.45rem 0.5rem; color: #aaa; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #333; }
.checkbox-row .pts { color: #999; font-size: 0.8rem; margin-left: 6px; }

/* Result header: category badge + label + risk */
.g-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.g-badge {
    display: inline-block; min-width: 3.2em; text-align: center; padding: 8px 12px; border-radius: 8px;
    font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; color: #fff; background: #555; white-space: nowrap;
}
.g-badge.sev-0 { background: #4a4a4a; }
.g-badge.sev-1 { background: #2e7d32; }
.g-badge.sev-2 { background: #5d8a1f; }
.g-badge.sev-3 { background: #b8860b; }
.g-badge.sev-4 { background: #c2571a; }
.g-badge.sev-5 { background: #b71c1c; }
.g-label { color: #fff; font-weight: 600; font-size: 1.02rem; }
.g-risk { color: #bbb; font-size: 0.88rem; margin-top: 2px; }

/* Reasons, follow-up dates and notes */
.g-why { margin-top: 12px; color: #999; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.g-reasons { margin: 4px 0 0; padding-left: 18px; color: #ddd; font-size: 0.9rem; line-height: 1.45; }
.g-reasons li { margin: 3px 0; }
.g-followups { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.g-followups li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; background: #2a2a2a; border-left: 3px solid #0066cc; border-radius: 4px; padding: 7px 10px; }
.g-followups li.optional { border-left-color: #666; }
.g-followups .fu-when { color: #fff; font-weight: 500; font-size: 0.92rem; }
.g-followups .fu-date { color: #7cc4ff; font-variant-numeric: tabular-nums; font-size: 0.92rem; white-space: nowrap; }
.g-followups .fu-note { grid-column: 1 / -1; color: #999; font-size: 0.8rem; }
.g-notes { margin: 12px 0 0; padding: 0; list-style: none; }
.g-notes li { background: #4a3413; color: #ffe0a3; border-left: 3px solid #ffcc66; border-radius: 4px; padding: 7px 10px; margin: 6px 0; font-size: 0.85rem; line-height: 1.4; }
/* Copy / Reset row under the report sentence: both solid blue so they stand out from the results. */
.g-copy { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.g-copy .copy-btn, .g-copy .g-reset { padding: 8px 16px; font-size: 0.9rem; background: #0066cc; border: 1px solid #0066cc; color: #fff; }
.g-copy .copy-btn:hover, .g-copy .g-reset:hover { background: #0052a3; border-color: #0052a3; }
.g-copy .copy-btn.copied { background: #2e7d32; border-color: #2ecc71; }
.g-copy .copy-status { margin: 0; flex: 1; }
.g-copy .g-reset { margin-left: auto; }

/* Reference tables in the notes section */
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 6px 0 10px; }
.ref-table th, .ref-table td { border: 1px solid #444; padding: 5px 8px; text-align: left; vertical-align: top; color: #eee; }
.ref-table th { background: #222; color: #ccc; font-weight: 500; }
.table-wrap { overflow-x: auto; }
.reference ul { margin: 0 0 6px; padding-left: 18px; color: #fff; line-height: 1.45; }
.reference li { margin: 3px 0; }

@media (max-width: 700px) {
    .g-followups li { grid-template-columns: 1fr; }
    .g-badge { font-size: 1.15rem; }
}

/* Info popup on a group heading (Alpine: x-data="{ open }" on the heading). */
[x-cloak] { display: none !important; }
.checkbox-grid .group-title { position: relative; display: flex; align-items: center; gap: 8px; }
.info-btn {
    flex: 0 0 auto; width: 18px; height: 18px; padding: 0; border-radius: 50%;
    border: 1px solid #666; background: #222; color: #ccc;
    font-size: 0.72rem; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none;
    cursor: pointer;
}
.info-btn:hover, .info-btn[aria-expanded="true"] { border-color: #7cc4ff; color: #fff; background: #0066cc; }
.info-pop {
    position: absolute; left: 0.5rem; top: calc(100% + 6px); z-index: 30;
    width: min(440px, calc(100vw - 3rem)); padding: 10px 14px 4px;
    background: #111; border: 1px solid #0066cc; border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    color: #ddd; font-size: 0.86rem; text-transform: none; letter-spacing: 0; line-height: 1.45;
}
.info-pop h4 { margin: 0 0 4px; color: #7cc4ff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.info-pop p { margin: 0 0 10px; }
