/* === Medicines read from old prescription photos (features/rx-import.js) === */
.rxi-overlay { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 15, 28, .5); }
.rxi-box {
  width: 100%; max-width: 880px; max-height: 88vh; display: flex; flex-direction: column; gap: 10px; padding: 20px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-light); border-radius: var(--radius-lg, 6px); box-shadow: var(--shadow-md);
}
.rxi-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rxi-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.rxi-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.rxi-help strong { color: var(--text); }
.rxi-bulk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.rxi-bulk .btn-secondary { padding: 3px 10px; font-size: 12px; }
.rxi-scroll { overflow: auto; min-height: 0; border: 1px solid var(--border-light); border-radius: var(--radius-sm, 4px); }
.rxi-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rxi-table th {
  position: sticky; top: 0; z-index: 1; padding: 8px; text-align: start; background: var(--bg-secondary);
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-tertiary);
}
.rxi-table td { padding: 6px 8px; border-top: 1px solid var(--border-light); vertical-align: top; }
.rxi-table td .form-control { width: 100%; min-width: 0; padding: 6px 8px; font-size: 13.5px; }
.rxi-table td:nth-child(2) { min-width: 180px; }
.rxi-table td:nth-child(3) { min-width: 160px; }
.rxi-c { width: 34px; text-align: center; }
.rxi-c input[type="checkbox"] { width: 18px; height: 18px; margin-top: 7px; }
.rxi-date { min-width: 150px; }
.rxi-unknown { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-tertiary); }
.rxi-known { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--warning); }
.rxi-off td:not(.rxi-c) { opacity: .5; }
.rxi-addrow { align-self: flex-start; padding: 4px 12px; font-size: 12px; }
.rxi-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
@media (max-width: 720px) {
  .rxi-overlay { padding: 8px; }
  .rxi-box { padding: 14px; max-height: 94vh; }
  .rxi-table thead { display: none; }
  .rxi-table tr { display: grid; grid-template-columns: 34px 1fr 1fr 34px; gap: 4px 6px; padding: 8px 4px; border-top: 1px solid var(--border-light); }
  .rxi-table td { border: 0; padding: 0; }
  .rxi-table td:nth-child(2) { grid-column: 2 / 4; }
  .rxi-table td:nth-child(3) { grid-column: 2 / 4; }
  .rxi-table td:nth-child(4), .rxi-table td:nth-child(5) { grid-column: auto; }
  .rxi-table td:nth-child(6) { grid-row: 1; grid-column: 4; }
}

/* A medicine's start date beside its dose. */
.medrow-start { flex: none; align-self: center; font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; }
.rxi-unknown[hidden] { display: none; }
