/* 簽名板 Modal 全螢幕版面全域覆寫樣式
   由於 Blazor scoped CSS 無法從子元件 .signature-pad-container 往祖先
   .modal-dialog / .modal-content / .modal-body 套用，故這部分規則放在全域 CSS。
   使用 :has() 僅在內含簽名容器的 Modal 生效，不影響其他 Modal。 */

/* ===== Modal 鋪滿視窗 ===== */
.modal-dialog:has(.signature-pad-container) {
    max-width: 100%;
    width: 100%;
    height: 100dvh; /* dvh：扣掉手機瀏覽器網址列後真正可見高度 */
    margin: 0 !important;
}

.modal-dialog:has(.signature-pad-container) .modal-content {
    height: 100dvh;
    border-radius: 0;
    border: 0;
    display: flex;
    flex-direction: column;
}

/* ===== Body：flex 填滿 + 不捲動（修正捲軸根因） =====
   覆寫 BaseModalComponent 的 .modal-body { max-height: calc(100dvh-210px); overflow-y:auto }，
   改成 flex 填滿剩餘空間、內部不捲動，畫布直接吃滿高度。 */
.modal-dialog:has(.signature-pad-container) .modal-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
}

.modal-dialog:has(.signature-pad-container) .modal-body-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
}

/* ===== 加大觸控按鈕（平板 / kiosk 簽收情境） ===== */
.signature-action-btn {
    min-width: 92px;
}
