.quote-dialog-open {
  overflow: hidden;
}

.quote-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  overflow: visible;
  color: #071c3f;
  background: transparent;
}

.quote-dialog::backdrop {
  background: rgba(2, 14, 34, .76);
  backdrop-filter: blur(9px);
}

.quote-dialog__surface {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: 28px;
  background: #f8fafc;
  box-shadow: 0 28px 80px rgba(2, 14, 34, .34);
  animation: quote-enter .42s cubic-bezier(.2, .75, .24, 1) both;
}

.quote-dialog__close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(7, 28, 63, .14);
  border-radius: 50%;
  color: #071c3f;
  background: rgba(255, 255, 255, .9);
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.quote-dialog__close:hover {
  color: #fff;
  background: #174ca5;
  transform: rotate(4deg);
}

.quote-dialog__close svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.quote-dialog__intro {
  position: relative;
  display: flex;
  min-height: 630px;
  padding: clamp(42px, 5vw, 68px);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background: #0b326d;
}

.quote-dialog__intro::after {
  position: absolute;
  right: -92px;
  bottom: -110px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(255, 255, 255, .035), 0 0 0 88px rgba(255, 255, 255, .025);
  content: "";
}

.quote-dialog__intro h2 {
  position: relative;
  z-index: 1;
  max-width: 9ch;
  margin: 0 0 24px;
  color: inherit;
  font-size: clamp(2.75rem, 4.8vw, 4.75rem);
  line-height: .94;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.quote-dialog__intro p {
  position: relative;
  z-index: 1;
  max-width: 33ch;
  margin: 0;
  color: #d7e5f8;
  font-size: 1rem;
  line-height: 1.65;
}

.quote-dialog__direct {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .22);
}

.quote-dialog__direct span {
  margin-bottom: 4px;
  color: #aac3e4;
  font-size: .78rem;
  font-weight: 700;
}

.quote-dialog__direct a {
  width: fit-content;
  color: #fff;
  font-size: .98rem;
  font-weight: 700;
  text-decoration-color: rgba(255, 255, 255, .38);
  text-underline-offset: 4px;
}

.quote-form {
  display: flex;
  min-width: 0;
  padding: clamp(48px, 5vw, 68px);
  flex-direction: column;
  justify-content: center;
}

.quote-form__heading {
  margin-bottom: 30px;
  padding-right: 48px;
}

.quote-form__heading strong {
  display: block;
  margin-bottom: 7px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.quote-form__heading p,
.quote-form__footer p {
  margin: 0;
  color: #5d6f89;
  font-size: .84rem;
  line-height: 1.5;
}

.quote-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
}

.quote-field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.quote-field--wide {
  grid-column: 1 / -1;
}

.quote-field > span {
  color: #263b5a;
  font-size: .82rem;
  font-weight: 750;
}

.quote-field b {
  color: #174ca5;
}

.quote-field input,
.quote-field select,
.quote-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #c7d2e1;
  border-radius: 12px;
  outline: none;
  color: #071c3f;
  background: #fff;
  font: inherit;
  line-height: 1.35;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.quote-field textarea {
  min-height: 112px;
  resize: vertical;
}

.quote-field textarea::placeholder {
  color: #667892;
  opacity: 1;
}

.quote-field input:hover,
.quote-field select:hover,
.quote-field textarea:hover {
  border-color: #8297b4;
}

.quote-field input:focus-visible,
.quote-field select:focus-visible,
.quote-field textarea:focus-visible {
  border-color: #174ca5;
  box-shadow: 0 0 0 3px rgba(23, 76, 165, .15);
}

.quote-consent {
  display: grid;
  margin-top: 20px;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: #52657f;
  font-size: .79rem;
  line-height: 1.5;
  cursor: pointer;
}

.quote-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #174ca5;
}

.quote-form__footer {
  display: grid;
  margin-top: 26px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.quote-form__footer p {
  max-width: 30ch;
}

.quote-form__footer button {
  display: inline-flex;
  min-height: 54px;
  padding: 12px 18px 12px 22px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #174ca5;
  box-shadow: 0 12px 28px rgba(23, 76, 165, .24);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.quote-form__footer button:hover {
  background: #0b326d;
  box-shadow: 0 16px 32px rgba(11, 50, 109, .26);
  transform: translateY(-2px);
}

.quote-form__footer button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quote-dialog :focus-visible {
  outline: 3px solid rgba(36, 113, 224, .4);
  outline-offset: 3px;
}

.quote-form__status {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  color: #0b4f34;
  background: #e5f5ec;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.45;
}

@keyframes quote-enter {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
  .quote-dialog {
    width: min(100% - 20px, 620px);
    max-height: calc(100dvh - 20px);
  }

  .quote-dialog__surface {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .quote-dialog__intro {
    min-height: 0;
    padding: 32px 70px 30px 28px;
  }

  .quote-dialog__intro h2 {
    max-width: 12ch;
    margin-bottom: 14px;
    font-size: clamp(2.15rem, 11vw, 3.15rem);
  }

  .quote-dialog__direct {
    display: none;
  }

  .quote-dialog__close {
    top: 14px;
    right: 14px;
  }

  .quote-form {
    padding: 30px 28px 34px;
  }

  .quote-form__heading {
    margin-bottom: 24px;
    padding-right: 0;
  }
}

@media (max-width: 520px) {
  .quote-form__grid,
  .quote-form__footer {
    grid-template-columns: 1fr;
  }

  .quote-form__grid {
    gap: 16px;
  }

  .quote-form__footer {
    gap: 14px;
  }

  .quote-form__footer button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote-dialog__surface,
  .quote-dialog__close,
  .quote-form__footer button {
    animation: none;
    transition: none;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .quote-dialog::backdrop {
    background: rgba(2, 14, 34, .88);
  }
}
