/* One dialog language for client pages, authentication and ordering. */
html body .modal .modal-dialog { position:relative; top:auto; left:auto; right:auto; width:560px; max-width:calc(100% - 32px); margin:clamp(24px,8vh,72px) auto; padding:0; direction:rtl; }
html body .modal .modal-dialog.modal-lg { width:900px; }
html body .modal .modal-dialog.modal-xl { width:1140px; }
html body .modal .modal-dialog.modal-sm,
html body .modal-remove-item .modal-dialog { width:420px; }
html body .modal .modal-dialog .modal-content { display:flex; flex-direction:column; max-height:calc(100dvh - 64px); overflow:hidden; border:1px solid var(--ph-line)!important; border-radius:16px!important; background:var(--ph-surface)!important; color:var(--ph-ink)!important; box-shadow:0 24px 80px rgba(0,0,0,.22); }
html body .modal .modal-dialog .modal-content > form { display:flex; flex-direction:column; min-height:0; max-height:inherit; }
html body .modal .modal-dialog .modal-header { display:flex; align-items:center; gap:14px; flex:0 0 auto; padding:18px 22px; border:0; border-bottom:1px solid var(--ph-line); border-radius:0; background:var(--ph-surface)!important; color:var(--ph-ink); }
html body .modal .modal-dialog :is(.modal-title,.ph-remove-title) { margin:0; color:var(--ph-ink)!important; font-size:16px; font-weight:600; line-height:1.8; }
html body .modal .modal-dialog .modal-title { order:1; }
html body .modal .modal-dialog .modal-body { flex:1 1 auto; min-height:0; overflow:auto; padding:22px; color:var(--ph-muted); font-size:12px; line-height:2; background:var(--ph-surface); }
html body .modal .modal-dialog .modal-body :is(p,small,.text-muted) { color:var(--ph-muted); }
html body .modal .modal-dialog .modal-body :is(h1,h2,h3,h4,h5,label,strong) { color:var(--ph-ink); }
html body .modal .modal-dialog .modal-footer { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; flex:0 0 auto; gap:10px; padding:16px 22px!important; height:auto; border:0; border-top:1px solid var(--ph-line); background:var(--ph-surface-alt); }
html body .modal .modal-dialog .modal-footer::before,
html body .modal .modal-dialog .modal-footer::after { display:none; }
html body .modal .modal-dialog .close { position:static!important; order:2; display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; min-height:30px; margin:0; margin-inline-start:auto; padding:0; border:1px solid var(--ph-line); border-radius:8px; background:var(--ph-surface-alt); color:var(--ph-muted)!important; opacity:1; font-size:20px; font-weight:400; text-shadow:none; line-height:1; box-shadow:none; }
html body .modal .modal-dialog .close :is(i,.fa-3x) { width:17px; height:17px; font-size:17px; }
html body .modal .modal-dialog .close:hover { color:var(--ph-ink)!important; border-color:var(--ph-primary); }
html body .modal .modal-dialog .modal-body > .float-right { float:left!important; margin-inline-start:12px; }
html body .modal .modal-dialog .ph-remove-title { margin:0 0 12px; padding-inline-end:38px; }
html body .modal .modal-dialog .modal-footer .btn { flex:0 0 auto; width:auto; min-width:94px; min-height:40px; margin:0; padding:9px 16px; border-radius:9px; font-size:12px; font-weight:500; line-height:1.7; box-shadow:none; }
html body .modal .modal-dialog .btn-primary,
html body .modal .modal-dialog .btn-success { border-color:transparent; background:var(--ph-primary-action); color:#fff; }
html body .modal .modal-dialog .btn-default,
html body .modal .modal-dialog .btn-secondary { border:1px solid var(--ph-line); background:var(--ph-surface); color:var(--ph-ink); }
html body .modal .modal-dialog .btn-danger { border-color:transparent; background:var(--ph-danger); color:#fff; }
html body .modal .modal-dialog .form-control { min-height:42px; border:1px solid var(--ph-line); border-radius:9px; background:var(--ph-surface-alt); color:var(--ph-ink); font-size:13px; }
html body .modal .modal-dialog :is(button,a,input,select):focus-visible { outline:2px solid var(--ph-primary); outline-offset:3px; }
html body .modal-backdrop { background:#0a1221; }
html body .modal-backdrop.in,
html body .modal-backdrop.show { opacity:.65; }
@media(max-width:640px) {
    html body .modal .modal-dialog { max-width:calc(100% - 24px); margin:24px auto; }
    html body .modal .modal-dialog .modal-content { max-height:calc(100dvh - 48px); border-radius:13px!important; }
    html body .modal .modal-dialog .modal-header,
    html body .modal .modal-dialog .modal-body { padding:18px; }
    html body .modal .modal-dialog .modal-footer { padding:14px 18px!important; gap:8px; }
    html body .modal .modal-dialog :is(.modal-title,.ph-remove-title) { font-size:15px; }
}
@media(prefers-reduced-motion:reduce) { html body .modal.fade .modal-dialog { transition:none; } }
