/* Self-contained sheets for marker-info.js ("What is this?") and my-symptoms.js ("My symptoms").
   A bottom sheet on phones, a centered card on wider screens. Uses the dashboard's tokens (--surface, --line, ...). */
.fh-sheet { position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fh-sheet[hidden] { display: none; }
.fh-sheet .fh-backdrop { position: absolute; inset: 0; background: rgba(20, 24, 22, .45); }
.fh-sheet .fh-panel { position: relative; width: 100%; max-width: 460px; max-height: min(640px, calc(100vh - 32px)); overflow: auto;
  background: var(--surface, #fff); border: 1px solid var(--line, #e3e8ee); border-radius: 16px; box-shadow: 0 18px 48px rgba(0,0,0,.2);
  padding: 16px 18px 18px; font-size: 13.5px; line-height: 1.5; overscroll-behavior: contain; }
.fh-sheet .fh-grab { display: none; width: 40px; height: 4px; border-radius: 2px; background: var(--line, #e3e8ee); margin: -6px auto 10px; }
.fh-sheet header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.fh-sheet header h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.25; }
.fh-sheet .fh-k { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3, #6b7280); }
.fh-sheet .fh-x { margin-left: auto; border: 0; background: var(--surface-2, #f1f4f7); width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink-2, #374151); flex: none; }
.fh-sheet .fh-note { background: var(--surface-2, #f1f4f7); border-radius: 10px; padding: 10px 12px; color: var(--ink-2, #374151); }
.fh-sheet .fh-foot { margin-top: 12px; font-size: 12px; color: var(--ink-3, #6b7280); }
.fh-sheet .fh-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.fh-sheet ul.mi-bullets, .fh-sheet .mi-body ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.fh-sheet .thinking { display: flex; gap: 8px; align-items: center; color: var(--ink-3, #6b7280); }
body.fh-sheet-open .pop { z-index: 1000; }  /* citation popovers open above the sheet */

@media (max-width: 640px) {
  .fh-sheet { align-items: flex-end; padding: 0; }
  .fh-sheet .fh-panel { max-width: none; max-height: 85vh; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
  .fh-sheet .fh-grab { display: block; }
}

/* "What is this?" link next to each marker name on the lab cards */
.mi-link { border: 0; background: none; padding: 0 0 0 6px; font: inherit; font-size: 11px; color: var(--accent, #0f766e);
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; white-space: nowrap; }
.mi-link:hover { text-decoration-style: solid; }

/* My symptoms */
.ms-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.ms-list li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line, #e3e8ee); border-radius: 10px; padding: 7px 8px; }
.ms-list li.archived { opacity: .6; }
.ms-list .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ms-list .nm { flex: 1; min-width: 0; }
.ms-list .nm b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-list .nm small { color: var(--ink-3, #6b7280); }
.ms-list button { border: 1px solid var(--line, #e3e8ee); background: var(--surface, #fff); border-radius: 7px; min-width: 30px; height: 30px;
  font: inherit; font-size: 12px; cursor: pointer; color: var(--ink-2, #374151); padding: 0 8px; }
.ms-list button:disabled { opacity: .35; cursor: default; }
.ms-list input { font: inherit; font-size: 13px; border: 1px solid var(--line, #e3e8ee); border-radius: 7px; padding: 5px 7px; width: 100%; }
.ms-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ms-sugg button { border: 1px solid var(--line, #e3e8ee); background: var(--surface, #fff); border-radius: 999px; padding: 5px 11px; font: inherit;
  font-size: 12.5px; cursor: pointer; color: var(--ink-2, #374151); }
.ms-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.ms-add input, .ms-add select { font: inherit; font-size: 13px; border: 1px solid var(--line, #e3e8ee); border-radius: 8px; padding: 7px 9px; min-width: 0; }
.ms-err { color: var(--high, #b91c1c); font-size: 12px; min-height: 16px; margin-top: 6px; }
.ms-h { font-size: 12px; font-weight: 700; margin: 12px 0 4px; color: var(--ink-2, #374151); }
@media (max-width: 640px) { .ms-add { grid-template-columns: 1fr; } }
