/* ============================================
   app-prescription.css
   ============================================
   Prescription table styles including editable
   prescription tables and read-only prescription modes.
   ============================================ */

/* ── Editable prescription table ───────────────────────────────── */
.rx-structure-grid { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin-bottom: var(--spacing-sm); }
.rx-field { display: flex; flex-direction: column; gap: 0.2rem; min-width: 140px; }
.rx-field--review .rx-label { color: var(--color-danger); font-weight: var(--wp-weight-bold); }
.rx-field--review .rx-select, .rx-field--review .rx-input { border-color: var(--color-danger); background: var(--color-danger-bg); }
.rx-label { font-size: var(--wp-text-sm); font-weight: var(--wp-weight-semibold); color: var(--color-text-secondary); }
.rx-input, .rx-select { font-size: var(--wp-text-base); padding: 0.3rem 0.5rem; border: var(--border-default); border-radius: var(--radius-inset); background: var(--color-surface-input); color: var(--color-text-primary); }
.rx-input:focus, .rx-select:focus { outline: 0.5px solid var(--color-primary); border-color: var(--wp-accent); }
.rx-row--review td { background: var(--color-danger-bg); }
.rx-row--review td:first-child { border-left: 3px solid var(--color-danger); }
.rx-feedback { padding: var(--spacing-sm) var(--spacing-md); border-radius: var(--radius-inset); font-size: var(--wp-text-base); margin-bottom: var(--spacing-sm); }
.parse-table td .rx-input { width: 100%; min-width: 60px; }
.parse-table td .rx-select { width: 100%; }

/* ── Read-only mode for prescription editor ─────────────────────── */
.rx-edit-bar { display: none; justify-content: space-between; align-items: center; gap: var(--gap-sm); margin-bottom: var(--spacing-sm); }
#prescription-section.rx--readonly .rx-edit-bar { display: flex; }
#prescription-section.rx--readonly .rx-save-bar { display: none; }
#prescription-section.rx--readonly .rx-input, #prescription-section.rx--readonly .rx-select { border: none; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; cursor: default; opacity: 1; }
#prescription-section.rx--readonly #rx-add-row, #prescription-section.rx--readonly .rx-btn-remove, #prescription-section.rx--readonly #rx-interval-group, #prescription-section.rx--readonly #rx-format-change-notice { display: none; }

/* Load (lb) greyed out when movement doesn't use load (e.g. bodyweight, cardio) */
.rx-input.rx-load--irrelevant, .parse-table td.rx-load--irrelevant .rx-input { background: var(--color-surface-muted); color: var(--color-text-tertiary); cursor: not-allowed; }
