/* Styles of the clinic, pharmacy and billing pages (see pages/clinic.js, pharmacy.js, billing.js). */

/* prescribing dialog */
.rx-lines { display: flex; flex-direction: column; gap: 8px; }
.rx-head { padding: 0 2px; }
.rx-line { display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(90px, 0.8fr) minmax(90px, 0.7fr) minmax(110px, 1fr) 64px 80px minmax(140px, 1.2fr) auto; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.rx-line .rx-drug { display: flex; flex-direction: column; gap: 4px; }
.rx-line input, .rx-line select { height: 32px; padding: 0 8px; min-width: 0; width: 100%; }
.rx-line input.short { width: 64px; }
@media (max-width: 900px) { .rx-line { grid-template-columns: 1fr 1fr; } .rx-line .rx-drug { grid-column: 1 / -1; } }

/* notes */
.timeline .tl.draft { opacity: 0.92; }
.timeline .tl.draft::before { background: var(--warn); }
.note-data { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 14px; font-size: 13px; margin-bottom: 6px; }

/* printable prescription */
.paper.rx { font-family: var(--font); padding: 30px 40px; max-width: 760px; margin-top: 14px; }
.paper.rx .rx-paper-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #0f8a3a; padding-bottom: 10px; margin-bottom: 12px; }
.paper.rx .co-name { font-size: 16px; font-weight: 700; }
.paper.rx .addr { font-size: 11.5px; color: #333; }
.paper.rx .rx-no { text-align: right; font-size: 13px; }
.paper.rx .rx-patient { margin-bottom: 10px; font-size: 13.5px; }
.paper.rx .rx-allergy { color: #b11a21; font-weight: 700; }
.paper.rx .rx-symbol { font-size: 30px; font-weight: 700; color: #0f8a3a; line-height: 1; margin: 4px 0; }
.paper.rx table.data th { background: #f2f2f2; color: #000; }
.paper.rx table.data td, .paper.rx table.data th { border-bottom: 1px solid #ccc; }
.paper.rx .rx-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 36px; font-size: 13px; }
.paper.rx .rx-sig-line { border-top: 1px solid #000; min-width: 220px; text-align: center; font-size: 11px; padding-top: 3px; }
@media screen { .paper.rx { display: none; } }
@media print { .paper.rx { display: block; margin: 0; } }

/* dispensing labels: printed only */
.print-only { display: none; }
@media print { .print-only { display: block; } .labels { display: flex; flex-wrap: wrap; gap: 6px; } .paper.label { break-inside: avoid; } }

/* invoice */
.paper.invoice { margin-top: 14px; }
.paper.invoice .inv-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #0f8a3a; padding-bottom: 10px; margin-bottom: 14px; }
.paper.invoice .co-name { font-size: 16px; font-weight: 700; }
.paper.invoice .addr { font-size: 11.5px; color: #333; }
.paper.invoice .inv-no { text-align: right; }
.paper.invoice .inv-no h1 { margin: 0 0 4px; font-size: 20px; color: #0f8a3a; }
.paper.invoice .inv-to { margin-bottom: 14px; font-size: 13px; }
.paper.invoice .cap { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #555; }
.paper.invoice table.lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.paper.invoice table.lines th { background: #f2f2f2; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.paper.invoice table.lines tfoot td { border-bottom: 0; padding-top: 6px; }
.paper.invoice .inv-payments { margin-top: 12px; font-size: 12.5px; }
.paper.invoice .inv-foot { margin-top: 24px; font-size: 12px; color: #333; border-top: 1px solid #ccc; padding-top: 8px; }

/* queue */
.queue-row .btn + .btn { margin-left: 4px; }
