/* Al Madina Polyclinic — prescription letterhead.
   SHARED between the staff console (print) and the patient's own copy, so the
   digital prescription is the same document the clinic prints. */

/* ---- Prescription letterhead (matches the clinic's printed pads) ---- */
.rxsheet {
  background: #fff; color: #0b1f3a;
  font-family: 'Times New Roman', Georgia, serif;
  border: 1px solid var(--line, #e5e7eb); border-radius: 10px;
  padding: 18px 24px 14px; max-width: 760px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rx-contact { text-align: right; font-size: 12px; font-weight: 700; line-height: 1.4; }
.rx-title { text-align: center; font-weight: 800; white-space: nowrap; font-size: clamp(16px, 3.6vw, 30px); letter-spacing: .2px; color: #0b2e6b; line-height: 1.1; margin-top: -4px; }
.rx-addr { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.rx-head { display: grid; grid-template-columns: 1.6fr auto 1fr; gap: 16px; align-items: start; margin-top: 12px; }
.rx-cad { text-align: center; transform: translateX(-60px); }
.rx-cad-img { height: 78px; width: auto; display: block; margin: 0 auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rx-doc-name { font-style: italic; font-weight: 800; font-size: 22px; color: #0b2e6b; margin-bottom: 3px; }
.rx-q { font-size: 11.5px; font-weight: 700; line-height: 1.45; }
.rx-timing { font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.rx-th { text-decoration: underline; font-weight: 800; font-size: 13.5px; }
.rx-dated { text-align: right; margin-top: 14px; font-size: 14px; }
.rx-rule { border-bottom: 2px solid #0b1f3a; margin: 5px 0; }
.rx-patient { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; padding: 3px 0; }
/* Prescription always reads in capitals, however the doctor typed it. */
.rx-patient, .rx-body { text-transform: uppercase; }
.rx-body { display: grid; grid-template-columns: 150px 1fr; min-height: 460px; }
.rx-inv { font-weight: 800; font-size: 14px; padding-top: 10px; }
.rx-content { border-left: 2px solid #0b1f3a; padding: 8px 0 0 18px; }
.rx-symbol { font-size: 36px; font-weight: 800; color: #0b2e6b; line-height: 1; }
.rx-notes { font-size: 14px; margin: 8px 0 14px; }
.rx-line2 { font-size: 14px; margin: 2px 0 6px; }
.rx-exline { font-size: 13.5px; margin: 1px 0 1px 14px; }
.rx-inv-list { font-weight: 600; font-size: 13px; margin-top: 6px; line-height: 1.55; }
.rx-meds { margin: 10px 0 0 20px; padding: 0; }
.rx-meds li { margin-bottom: 14px; font-size: 15px; }
.rx-meds .m-nm { font-weight: 700; display: block; }
.rx-meds .m-dt { font-size: 13.5px; color: #333; }
.rx-web { text-align: center; font-size: 12.5px; font-weight: 700; color: #0b2e6b; margin-top: 3px; }
.rx-doc-role { font-weight: 800; font-size: 12px; color: #0b2e6b; margin-bottom: 4px; }
.rx-worked { font-size: 11px; font-weight: 600; color: #333; margin-top: 5px; line-height: 1.4; }
.rx-tline { margin-bottom: 4px; }
.rx-consult { border: 1px dashed #0b2e6b; border-radius: 8px; padding: 7px 10px; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.rx-consult-h { font-weight: 800; font-size: 12px; color: #0b2e6b; text-transform: uppercase; letter-spacing: .04em; width: 100%; }
.rx-c { font-size: 12px; }
.rx-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-top: 12px; }
.rx-foot-note { font-size: 11.5px; font-weight: 700; color: #0b2e6b; margin-top: 3px; }
.rx-foot { border-top: 2px solid #0b1f3a; margin-top: 12px; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 800; }
.rx-foot-main { text-align: center; flex: 1; }
.rx-foot-strong { font-size: 12.5px; }
.rx-foot-it { font-style: italic; font-weight: 600; }
.rx-foot-qr { text-align: center; font-size: 9.5px; font-weight: 700; color: #0b2e6b; line-height: 1.2; }
.rx-foot-qr img { display: block; margin: 0 auto 2px; }
@media (max-width: 640px) {
  .rxsheet { padding: 14px 14px 10px; }
  /* the printed sheet keeps the name on one line; a phone needs it to wrap */
  .rx-title { white-space: normal; font-size: clamp(15px, 5.6vw, 24px); }
  .rx-head { grid-template-columns: 1fr; }
  .rx-timing { text-align: left; }
  .rx-body { grid-template-columns: 1fr; min-height: 0; }
  .rx-content { border-left: none; padding-left: 0; }
  .rx-inv { padding-top: 0; }
  .rx-foot { flex-direction: column-reverse; text-align: center; }
  .rx-meta { flex-direction: column; gap: 4px; }
}


/* Rendering the patient's PDF copy on a phone: force the full A4 layout so the
   downloaded prescription matches the printed sheet instead of the narrow
   stacked view. Higher specificity than the mobile media query above. */
.rxsheet.rx-wide { width: 760px; max-width: none; padding: 18px 24px 14px; }
.rxsheet.rx-wide .rx-head { grid-template-columns: 1.6fr auto 1fr; }
.rxsheet.rx-wide .rx-body { grid-template-columns: 150px 1fr; min-height: 460px; }
.rxsheet.rx-wide .rx-content { border-left: 2px solid #0b1f3a; padding: 8px 0 0 18px; }
.rxsheet.rx-wide .rx-inv { padding-top: 10px; }
.rxsheet.rx-wide .rx-timing { text-align: right; }
.rxsheet.rx-wide .rx-foot { flex-direction: row; text-align: left; }
.rxsheet.rx-wide .rx-meta { flex-direction: row; gap: 12px; }
