/* Popup_Check_Design.xlsx: reviewed dialogs only. Same type sizes at every viewport.
   Geometry follows Short Form's duplicate-registration result dialog. */
html body .modal.brd-popup[id] .modal-dialog {
    width: calc(100% - 32px);
    max-width: 400px;
    margin: 16px auto;
    min-height: calc(100% - 32px);
    display: flex;
    align-items: center;
    padding: 0;
}
html body .modal.brd-popup[id] .modal-content {
    width: 100%;
    border: 0;
    border-radius: 16px !important;
    background: #fff;
}
html body .modal.brd-popup[id] .modal-body {
    padding: 16px 8px 12px !important;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    text-align: center;
    font: 400 22px/1.35 dboz, sans-serif;
}
html body .modal.brd-popup[id] :is(.sf-result-message, .result-popup-message, .fullform-dialog-description,
    .fullform3-ocr-error-description, .kyc-result-copy, .modal-body > p,
    #msg-respone, #dopa-status-message, #msg-error-dopa, #msg-error-dopa-draft) {
    color: #202020 !important;
    font: 400 22px/1.35 dboz, sans-serif !important;
    overflow-wrap: anywhere;
}
html body .modal.brd-popup[id] :is(.sf-result-title, .result-popup-title, .exit-popup-baseline-title,
    .fullform-dialog-title, .fullform3-ocr-error-title, .scan-modal-title, .verify-modal-title, .ncb-modal-title, .kyc-modal-title, #draft-result-title) {
    display: block;
    color: #003f67 !important;
    font: 700 24px/1.2 dboz, sans-serif !important;
    margin: 0 0 16px !important;
    overflow-wrap: anywhere;
}
html body .modal.brd-popup[id] :is(.sf-result-message, .result-popup-message, .fullform-dialog-description,
    .fullform3-ocr-error-description, .kyc-result-copy, .modal-body > p, #msg-respone) {
    margin: 0 8px 24px !important;
}
html body .modal.brd-popup[id] :is(.btn, .btn-next-ndid, .result-popup-primary, .result-popup-secondary,
    .scan-button, .verify-primary, .verify-secondary, .ncb-primary, .ncb-secondary,
    .kyc-primary, .kyc-secondary, .upload-action, #btn-dopa-status-ok) {
    font: 400 22px/1.2 dboz, sans-serif !important;
    min-height: 48px;
    height: auto;
    border-radius: 16px !important;
    padding: 10px 16px !important;
    white-space: normal;
}
/* Not-found is body copy; only a failed lookup has a blue heading. */
html body #draft-status-respone.brd-popup.is-draft-not-found #draft-result-title {
    color: #202020 !important;
    font: 400 22px/1.35 dboz, sans-serif !important;
}
html body #draft-status-respone.brd-popup #msg-respone { white-space: pre-line; }
/* Remove legacy grid offsets from the single-action DOPA result dialogs. */
html body .modal.brd-popup:is(#modal-data-error-dopa, #modal-data-error-dopa-draft, #modal-dopa-status) .modal-body :is(.py-3, .py-lg-4, .pt-lg-2, .px-3) {
    padding: 0 !important;
}
html body .modal.brd-popup:is(#modal-data-error-dopa, #modal-data-error-dopa-draft, #modal-dopa-status) .row {
    margin: 0;
}
html body .modal.brd-popup:is(#modal-data-error-dopa, #modal-data-error-dopa-draft, #modal-dopa-status) .row > div {
    width: 100%;
    margin-left: 0;
    padding: 0 !important;
}
html body .modal.brd-popup .fullform-dialog-description { display: block; margin-top: 16px !important; }
/* Existing draft dates/IDs remain available to the save-draft code. */
html body .modal.brd-popup.exit-popup-baseline:is(#modaldraft, #modaldraftMaster) .modal-body :is(p:not(.exit-popup-baseline-title), span) {
    color: #202020 !important;
    font: 400 22px/1.35 dboz, sans-serif !important;
}
html body .modal.brd-popup.exit-popup-baseline#modaldraft .modal-body > .py-1 > span {
    display: block;
    margin: 0 8px 24px !important;
}
html body .modal.brd-popup.exit-popup-baseline .modal-body > .py-1 > br { display: none; }
html body #modaldraft.brd-popup .modal-body { padding: 16px 8px 12px !important; }
/* Scan ID Card reuses the failure dialog for its already-approved OCR loading
   state. Preserve that state while applying the review to the failure state. */
html body #modal-scan-failed.brd-popup:has(#modal-scan-loading-section:not([hidden])) .modal-content {
    border-radius: 8px !important;
}
html body #modal-scan-failed.brd-popup #modal-scan-loading-section :is(.scan-modal-title, p) {
    font-size: var(--scan-modal-font-size) !important;
    line-height: 1.3 !important;
}
html body #modal-scan-failed.brd-popup:has(#modal-scan-loading-section:not([hidden])) .modal-body {
    padding: 16px 8px !important;
}
html body #modal-scan-failed.brd-popup #modal-scan-loading-section .scan-modal-title {
    color: #003f6b !important;
    margin: 0 0 12px !important;
}
/* Match Full Form 1's Next/Draft buttons: 48px minimum height, 16px corners
   (UAT 2026-11-18). Width stays split between the two controls inside the DOPA edit form. */
html body #modal-data-error-dopa-d.brd-popup-form .modal-footer .btn {
    flex: 1;
    width: auto !important;
    min-height: 48px;
    height: auto;
    border-radius: 16px !important;
    padding: 8px 16px !important;
    font: 400 22px/1.2 dboz, sans-serif !important;
}
/* IDP countdown reference: keep the instructions away from all four edges. */
html body #countdown-modal.kyc-countdown .modal-body {
    padding: 24px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
}
/* Salary-slip OCR uses a status overlay, not an MDB dialog. Match Scan ID Card's
   existing loading card without changing its hidden state or its OCR lifecycle. */
html body #fullform3-document-loading > div {
    width: calc(100vw - 32px);
    max-width: 400px;
    padding: 16px 8px;
    border-radius: 8px;
}
/* Scan ID Card sizes: 22px below 992px, 24px from 992px (title and body). */
html body #fullform3-document-loading { --scan-modal-font-size: 22px; }
html body #fullform3-document-loading .fullform3-loading-title {
    margin: 0 0 12px;
    font: 700 var(--scan-modal-font-size)/1.3 dboz, sans-serif;
}
html body #fullform3-document-loading p:not(.fullform3-loading-title) {
    margin: 0 0 16px;
    font: 400 var(--scan-modal-font-size)/1.3 dboz, sans-serif;
}
html body #fullform3-document-loading .fullform3-spinner {
    margin: 0 auto 16px;
    border-color: #cee7f3;
    border-top-color: #008bc9;
}
@media (min-width: 992px) {
    html body #fullform3-document-loading { --scan-modal-font-size: 24px; }
}
@media (max-width: 575px) {
    html body #countdown-modal.kyc-countdown .modal-body { padding: 24px 20px; }
}

/* DOPA edit form (UAT 2026-11-18): the date-of-birth validation carrier is not a visible field.
   It keeps a 1px layout box so jQuery Validate (ignore ":not(:visible)") still checks it. */
html body #modal-data-error-dopa-d #dopaBirthDate {
    position: absolute;
    width: 1px !important;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}
