/* ====================================
   prescription_check.css - 处方开具 Modal 样式
   所有自定义选择器以 .rx- 为前缀（命名空间隔离，不与父框架/页面样式污染）
   在父页面（patients/page.blade.php）中加载
   ==================================== */

/* ---- 业务按钮 ---- */
.rx-btn-primary { background: #0d6efd; border: 1px solid #0d6efd; color: #fff; border-radius: 4px; }
.rx-btn-primary:hover { background: #0b5ed7; border-color: #0b5ed7; color: #fff; }
.rx-btn-light { background: #e7f1ff; border: 1px solid #9ec5fe; color: #0d6efd; border-radius: 4px; }
.rx-section-title { font-weight: 700; font-size: 15px; border-left: 4px solid #0d6efd; padding-left: 8px; line-height: 1.2; margin-bottom: 10px; }
/* 主诉内容：正常字号换行展示，不截断 */
.rx-chief-complaint { font-size: 13px; color: #333; line-height: 1.5; word-break: break-all; }
/* 诊断徽章：牙位组 + 编码名称，按规则详细显示 */
.rx-diag-badge {
    display: inline-block;
    background: #eef4ff;
    border: 1px solid #c6d8ff;
    color: #2c5f9e;
    border-radius: 10px;
    font-size: 12px;
    padding: 2px 10px;
    margin: 0 6px 4px 0;
    line-height: 1.6;
}

/* ---- 药品明细表格 ---- */
.rx-table { font-size: 13px; }
.rx-table thead th { background: #f1f3f5; color: #333; font-weight: 600; white-space: nowrap; border-bottom: 2px solid #dee2e6; }
.rx-table tbody td { vertical-align: middle; white-space: nowrap; }
.rx-table tbody td input { min-width: 60px; }

.rx-add-row-btn {
    background: transparent;
    border: 1px dashed #9ec5fe;
    color: #0d6efd;
    font-size: 13px;
    border-radius: 5px;
    padding: 5px 14px;
    transition: 0.15s;
}
.rx-add-row-btn:hover { background: #e7f1ff; }

.rx-remove-row-btn {
    border: none;
    background: transparent;
    color: #e03131;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}
.rx-remove-row-btn:hover { background: #fff1f1; }

/* ---- 处方 Modal 尺寸：与原子窗口一致（近全屏，宽 1400px、高 100vh-32px） ---- */
/* 高特异性 + !important：压过 Bootstrap modal-dialog-centered+scrollable 组合的 height:100% 覆盖；
   min-height 双保险：即使 height 被覆盖，最小高度仍撑满 */
.rx-modal .modal-dialog.modal-dialog-centered.modal-dialog-scrollable {
    max-width: 1200px;
    width: calc(100vw - 40px);
    height: calc(100vh - 32px) !important;
    min-height: calc(100vh - 32px) !important;
    max-height: calc(100vh - 32px) !important;
    margin: 16px auto !important;
}
.rx-modal .modal-dialog.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}
