/* EHR PDF Modal Viewer 1.1.0 */
.ehr-pdf-modal, .ehr-pdf-modal * { box-sizing: border-box; }
.ehr-pdf-modal {
  position: fixed; inset: 0; z-index: 2147483000; display: none;
  align-items: center; justify-content: center; padding: 24px;
}
.ehr-pdf-modal.is-open { display: flex !important; }
.ehr-pdf-modal__backdrop {
  position: absolute; inset: 0; background: rgba(8,24,43,.80);
  backdrop-filter: blur(3px);
}
.ehr-pdf-modal__dialog {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  width: min(1100px, 96vw); height: min(900px, 92vh); overflow: hidden;
  border-radius: 12px; background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.ehr-pdf-modal__header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 62px; padding: 12px 18px; border-bottom: 1px solid #e5edf5;
  background: #fff;
}
.ehr-pdf-modal__title {
  overflow: hidden; color: #102f53; font-size: 16px; font-weight: 700;
  text-overflow: ellipsis; white-space: nowrap;
}
.ehr-pdf-modal__actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ehr-pdf-modal__open { color: #0874d1; font-size: 13px; font-weight: 600; text-decoration: none; }
.ehr-pdf-modal__close {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  padding: 0; border: 0; border-radius: 7px; background: #edf4fb; color: #102f53;
  font-size: 30px; line-height: 1; cursor: pointer;
}
.ehr-pdf-modal__content { position: relative; flex: 1; min-height: 0; background: #e8edf3; }
.ehr-pdf-modal__content iframe { display: block; width: 100%; height: 100%; border: 0; background: #e8edf3; }
.ehr-pdf-modal__fallback { position: absolute; inset: 0; padding: 32px; text-align: center; background: #fff; }
.ehr-pdf-modal__fallback[hidden] { display: none; }
body.ehr-pdf-modal-open { overflow: hidden; }
@media (max-width: 640px) {
  .ehr-pdf-modal { padding: 0; }
  .ehr-pdf-modal__dialog { width: 100%; height: 100%; max-height: 100dvh; border-radius: 0; }
  .ehr-pdf-modal__header { min-height: 56px; padding: 9px 12px; }
  .ehr-pdf-modal__title { font-size: 14px; }
  .ehr-pdf-modal__actions { gap: 8px; }
  .ehr-pdf-modal__open { max-width: 95px; font-size: 12px; }
}