.forester-quote-modal {
  width:min(780px, calc(100% - 40px));
  max-width:780px;
  max-height:calc(100vh - 48px);
  max-height:calc(100dvh - 48px);
  margin:auto;
  padding:0 36px 32px;
  border:0;
  border-radius:2px;
  background:var(--color-white);
  color:var(--color-graphite);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.forester-quote-modal::backdrop { background:rgba(20,26,30,.64); }
.forester-quote-modal__bar { position:sticky; top:0; z-index:1; display:flex; justify-content:flex-end; background:#fff; padding:8px 0; }
.forester-quote-modal__close { width:44px; height:44px; padding:0; border:0; background:transparent; color:var(--color-graphite); font:400 32px/1 var(--font-family-body); cursor:pointer; }
.forester-quote .forester-quote-modal__close:focus-visible { outline:0; box-shadow:none; color:var(--color-red); text-decoration:underline; text-underline-offset:4px; }
.forester-quote-modal .forester-quote__header { margin-bottom:28px; }
.forester-quote-modal .forester-quote__header p { font-size:15px; }
.forester-quote-modal .forester-quote__field { margin-bottom:16px; }
.forester-quote-modal .forester-quote__submit { margin-top:20px; }
@media(min-width:768px) {
  .forester-quote-modal { padding:24px 32px 20px; max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); scrollbar-gutter:auto; }
  .forester-quote-modal__bar { top:12px; height:0; padding:0; background:transparent; }
  .forester-quote-modal__close { position:absolute; top:0; right:-12px; font-size:28px; }
  .forester-quote-modal .forester-quote__header { margin-bottom:16px; }
  .forester-quote-modal .forester-quote__header h2 { margin-bottom:8px; padding-right:44px; }
  .forester-quote-modal .forester-quote__header p { line-height:1.5; }
  .forester-quote-modal .forester-quote__form[data-quote-mode="general"] { width:100%; grid-template-columns:minmax(0,1fr); gap:0; }
  .forester-quote-modal .forester-quote__fields { width:100%; }
  .forester-quote-modal .forester-quote__pair { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
  .forester-quote-modal .forester-quote__field { margin-bottom:10px; }
  .forester-quote-modal .forester-quote__field label { margin-bottom:6px; }
  .forester-quote-modal .forester-quote__details-trigger { padding:6px 0; }
  .forester-quote-modal textarea { min-height:88px; height:88px; }
  .forester-quote-modal .forester-quote__details { margin-top:12px; padding-top:18px; }
  .forester-quote-modal .forester-quote__submit { margin-top:10px; }
  .forester-quote-modal .forester-quote__privacy { margin-top:10px; line-height:1.5; }
}
@media(max-width:767px) {
  .forester-quote-modal { width:100%; max-width:100%; max-height:100vh; max-height:100dvh; border-radius:0; padding:0 max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
  .forester-quote-modal__bar { padding-top:max(8px,env(safe-area-inset-top)); }
  .forester-quote-modal .forester-quote__header h2 { font-size:30px; }
  .forester-quote-modal .forester-quote__submit .package-card__cta { max-width:none; width:100%; }
}

/* Freeze the visible dialog size before hiding the submitted form. */
.forester-quote-modal.is-success { height:var(--quote-success-height); overflow:hidden; scrollbar-gutter:auto; }
.forester-quote-modal.is-success[open] { display:flex; align-items:center; justify-content:center; }
.forester-quote-modal.is-success [data-quote-modal-host], .forester-quote-modal.is-success .forester-quote-modal__bar { display:none; }
.forester-quote-modal.is-success > .forester-quote__success { width:100%; margin:0; }
