/* Shared in-page dialog (partials/uiModal.ejs, /js/ui-modal.js), both layouts.
   The same shell dresses the page-specific forms (propose dates, decline or
   counter an offer): they write their fields between .ui-modal__body tags and
   only their fields differ. */
.ui-modal { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 16px; }
.ui-modal[hidden] { display: none !important; }
.ui-modal.is-open { display: flex; }
.ui-modal__backdrop { position: absolute; inset: 0; background: var(--scrim-strong); }
/* Scrolls inside the viewport on a short screen: the counter-offer form is
   taller than a phone. A fixed calendar opened from inside is not clipped by
   this overflow, its containing block is the viewport. */
.ui-modal__panel { position: relative; background: var(--white); border-radius: 12px; box-shadow: 0 20px 50px var(--scrim-panel); width: 100%; max-width: 440px; max-height: 92vh; overflow-x: hidden; overflow-y: auto; font-family: inherit; }
.ui-modal__panel--wide { max-width: 620px; }
.ui-modal__head { padding: 16px 20px 8px 20px; border-bottom: 1px solid var(--modal-border); }
.ui-modal__head h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--modal-ink); }
.ui-modal__body { padding: 14px 20px 18px 20px; }
.ui-modal__body p { margin: 0 0 10px 0; font-size: 14px; line-height: 1.55; color: var(--modal-text); white-space: pre-line; }
.ui-modal__sub { color: var(--muted); margin-bottom: 18px; }
.ui-modal__label { display: block; font-size: 13px; color: var(--ink-3); margin: 12px 0 4px; font-weight: 600; }
.ui-modal__error { color: var(--danger-dark); font-size: 13px; margin: 14px 0 0; }
.ui-modal__field { width: 100%; padding: 8px 10px; border: 1px solid var(--footer-hover); border-radius: 6px; font-size: 14px; font-family: inherit; box-sizing: border-box; }
.ui-modal__field--invalid { border-color: var(--modal-danger); }
textarea.ui-modal__field { min-height: 80px; resize: vertical; }
.ui-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 14px 20px; background: var(--surface-3); border-top: 1px solid var(--modal-border-2); }
.ui-modal__btn { padding: 8px 14px; font-size: 13px; font-weight: 500; border-radius: 6px; cursor: pointer; border: 1px solid transparent; font-family: inherit; }
.ui-modal__btn:disabled { opacity: .6; cursor: default; }
.ui-modal__btn--ghost { background: var(--white); color: var(--footer-line); border-color: var(--footer-hover); }
.ui-modal__btn--ghost:hover { background: var(--modal-surface); }
.ui-modal__btn--primary { background: var(--violet); color: var(--white); }
.ui-modal__btn--primary:hover:not(:disabled) { background: var(--violet-dark); }
.ui-modal__btn--danger { background: var(--modal-danger); color: var(--white); }
.ui-modal__btn--danger:hover:not(:disabled) { background: var(--modal-danger-dark); }
