.check-dialog{padding:0;border:1px solid var(--line,#ded8cd);border-radius:16px;width:min(980px,calc(100% - 24px));max-height:calc(100dvh - 48px);background:#fff;color:var(--ink,#252522);overflow:hidden;margin:auto;}
.check-dialog[open]{display:flex;flex-direction:column}.check-dialog::backdrop{background:#0007}
.check-header{display:flex;justify-content:space-between;gap:20px;padding:22px 24px;background:#faf8f3;border-bottom:1px solid var(--line);flex:none}.check-header h2{margin:4px 0 0}.check-header button{align-self:start}.check-header .eyebrow{margin:0}
.check-body{padding:24px;overflow:auto;min-height:0;overscroll-behavior:contain}.check-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.check-fields label,.check-offsets label{display:flex;flex-direction:column;gap:8px;min-width:0}.check-fields input,.check-fields select,.check-fields textarea,.check-offsets input{width:100%;min-width:0;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:8px;background:#fff;color:inherit;font:inherit}.check-wide{grid-column:1/-1}
.check-alignment{margin:24px 0;border-block:1px solid var(--line);padding:16px 0}.check-alignment summary{cursor:pointer}.check-offsets>div{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;align-items:center;margin:14px 0}.check-offsets label{font-size:13px}
.check-preview{max-width:660px;margin:16px auto;border:1px solid var(--line);background:white}.check-preview svg{display:block;width:100%;height:auto}.check-error{color:#975139}.check-footer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:none;border-top:1px solid var(--line)}.check-footer .text-button{margin:0;min-width:0;white-space:normal;border:0;border-radius:0;box-shadow:none;padding:18px 10px}.check-footer .text-button+.text-button{border-left:1px solid var(--line)}.check-footer .accent-action{background:#68715e;color:white}
.check-suggestions{border:1px solid var(--line);border-radius:8px;overflow:hidden}.check-suggestions button,.check-suggestions span{display:block;width:100%;padding:12px;text-align:left;border:0;background:white;color:inherit;font:inherit}.check-suggestions button+button{border-top:1px solid var(--line)}.check-suggestions button:hover{background:#f3f0e9}.check-suggestions[hidden]{display:none}
@media(max-width:600px){.check-body{padding:18px}.check-header{padding:18px}.check-fields{grid-template-columns:1fr}.check-footer{grid-template-columns:1fr 1fr}.check-footer .text-button:last-child{grid-column:1/-1;border-left:0;border-top:1px solid var(--line)}.check-dialog{max-height:calc(100dvh - 40px - env(safe-area-inset-bottom))}.check-offsets>div{grid-template-columns:1fr 1fr}.check-offsets strong{grid-column:1/-1}}

/* Match the floating subcontractor picker on desktop and mobile. */
.check-payee-picker{position:relative;display:flex;flex-direction:column;gap:8px;min-width:0}
.check-payee-picker .check-suggestions{position:absolute;left:0;right:0;top:100%;z-index:30;max-height:360px;overflow-y:auto;margin-top:8px;padding:8px;background:rgba(65,66,62,.97);color:#fff;border:1px solid #77786f;border-radius:20px;box-shadow:0 12px 30px #0003;backdrop-filter:blur(12px)}
.check-payee-picker .check-suggestions button{display:flex;flex-direction:column;gap:4px;min-height:64px;padding:14px 16px;background:transparent;color:#fff;font-size:15px;text-transform:none;letter-spacing:normal;border:0;border-bottom:1px solid #ffffff20;border-radius:10px;box-shadow:none;overflow-wrap:anywhere;white-space:normal}
.check-payee-picker .check-suggestions button:last-child{border-bottom:0}
.check-payee-picker .check-suggestions button:hover,.check-payee-picker .check-suggestions button:focus-visible{background:#ffffff18;outline:2px solid #ffffff60;outline-offset:-2px}
.check-payee-picker .check-suggestions strong{font-weight:500;line-height:1.35}
.check-payee-picker .check-suggestions small,.check-payee-picker .check-suggestions>span{background:transparent;color:#e0e0db;font-size:13px;line-height:1.4;text-transform:none;letter-spacing:normal}

.check-save-footer{grid-template-columns:repeat(2,minmax(0,1fr))}
.check-save-footer .text-button:nth-child(n+3){border-top:1px solid var(--line)}
.check-save-footer .text-button:nth-child(odd){border-left:0}
.check-queue-actions{display:flex;gap:0;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.check-queue-actions .text-button{flex:1;min-width:0;border:0;border-radius:0;box-shadow:none;white-space:normal}
.check-queue-actions .text-button+.text-button{border-left:1px solid var(--line)}
.check-queue-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:18px 0;border-bottom:1px solid var(--line)}
.check-queue-row>label{display:flex;align-items:center;gap:12px;min-width:0}
.check-queue-row small{display:block;color:var(--muted);overflow-wrap:anywhere}
.check-queue-row>label input{width:20px;height:20px;flex:none}
.check-queue-row>.check-queue-actions{grid-column:1/-1}
.check-batch-card{padding:18px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.check-history{margin-top:24px}.check-history summary{cursor:pointer}
.check-batch-preview ol{list-style:none;padding:0}.check-batch-preview li{display:flex;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}
.check-batch-footer{grid-template-columns:1fr 1fr}
@media(max-width:600px){.check-save-footer .text-button:last-child,.check-batch-footer .text-button:last-child{grid-column:auto;border-left:1px solid var(--line)}.check-batch-footer .text-button:last-child{border-top:0}.check-batch-preview li{flex-wrap:wrap}}

.check-fields #rememberPayeeAddress[hidden]{display:none}

/* Keep the saved-address checkbox aligned with its label, including wrapped text. */
#rememberPayeeAddress > span { display:flex; align-items:flex-start; gap:10px; line-height:1.5; }
.check-fields #savePayeeAddress { flex:0 0 auto; width:18px; height:18px; margin:3px 0 0; padding:0; }
