/* Reusable site-wide quote dialog. */

body.quote-modal-open { overflow: hidden; }

.quote-modal[hidden] { display: none !important; }

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 28px;
}

.quote-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 6, .82);
  backdrop-filter: blur(5px);
}

.quote-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  max-height: calc(100vh - 56px);
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
  border: 1px solid rgba(252, 188, 77, .28);
  border-radius: 5px;
  background: #fffdf9;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .46);
  color: #101110;
  overscroll-behavior: contain;
}

.quote-modal-close {
  position: sticky;
  top: 14px;
  z-index: 3;
  float: right;
  width: 42px;
  height: 42px;
  margin: 14px 14px -56px 0;
  display: grid;
  place-items: center;
  border: 1px solid #d8d2c7;
  border-radius: 50%;
  background: rgba(255, 253, 249, .96);
  color: #101110;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.quote-modal-close:hover,
.quote-modal-close:focus-visible { border-color: var(--fds-color-gold, #fcbc4d); }

.quote-modal-form-state { padding: 50px 54px 56px; }

.quote-modal-head {
  max-width: 680px;
  margin: 0 0 32px;
  padding-right: 46px;
}

.quote-modal .eyebrow {
  display: block;
  margin: 0 0 13px;
  color: var(--fds-color-gold, #fcbc4d) !important;
  -webkit-text-fill-color: var(--fds-color-gold, #fcbc4d) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .15em !important;
  text-transform: uppercase;
}

.quote-modal h2 {
  margin: 0 0 13px !important;
  color: #101110 !important;
  font-size: clamp(34px, 4vw, 46px) !important;
  line-height: 1.06 !important;
  letter-spacing: -.025em !important;
}

.quote-modal-head p {
  margin: 0 !important;
  color: #5f5b54 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}

.quote-modal-product-context {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-left: 3px solid var(--fds-color-gold, #fcbc4d);
  background: #f4f0e8;
}

.quote-modal-product-context span {
  display: block;
  margin-bottom: 4px;
  color: #716c64;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.quote-modal-product-context strong { font-size: 17px; }

.quote-modal-selection {
  margin: 0 0 28px;
  padding: 20px 22px;
  border: 1px solid #ded9cf;
  border-radius: 4px;
  background: #f9f6f0;
}

.quote-modal-selection h3 {
  margin: 0 0 14px !important;
  color: #101110 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.quote-modal-selection dl { margin: 0; }

.quote-modal-selection dl > div {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr);
  gap: 18px;
  padding: 9px 0;
  border-top: 1px solid #e1ddd5;
}

.quote-modal-selection dt {
  color: #68635c;
  font-size: 13px;
}

.quote-modal-selection dd {
  margin: 0;
  color: #101110;
  font-size: 13px;
  font-weight: 700;
}

.quote-modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quote-modal-form .field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.quote-modal-form .field { gap: 8px; }

.quote-modal-form .field > label {
  color: #101110 !important;
  font-size: 13px;
  font-weight: 600;
}

.quote-modal-form .required-marker { color: var(--fds-color-gold, #fcbc4d); }

.quote-modal-form :is(input[type="text"], input[type="email"], input[type="tel"], select) {
  min-height: 50px;
}

.quote-modal-form :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #c9c5bc;
  border-radius: 3px;
  background: #fff;
  color: #101110;
  font: inherit;
  font-size: 15px;
}

.quote-modal-form textarea { min-height: 150px; resize: vertical; }

.quote-modal-form :is(input, select, textarea):focus-visible {
  outline: 3px solid rgba(252, 188, 77, .25);
  outline-offset: 1px;
  border-color: var(--fds-color-gold, #fcbc4d);
}

.quote-modal-form input[readonly] {
  background: #f2efe8;
  color: #34322e;
  cursor: default;
}

.quote-modal-form .btn-block { min-height: 50px !important; width: 100%; }
.quote-modal-form .field-help { color: #706b63 !important; }
.quote-modal-error { margin-bottom: 24px; }

.quote-modal-success {
  min-height: 480px;
  padding: 70px 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.quote-modal-success[hidden] { display: none !important; }
.quote-modal-success p { max-width: 560px; color: #5f5b54 !important; line-height: 1.7; }
.quote-modal-reference { font-weight: 700; color: #101110 !important; }
.quote-modal-success .btn { margin-top: 16px; min-width: 160px; }

@media (max-width: 700px) {
  .quote-modal { padding: 18px; }
  .quote-modal-dialog { max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); }
  .quote-modal-form-state { padding: 44px 26px 32px; }
  .quote-modal-form .field-row { grid-template-columns: 1fr; }
  .quote-modal-selection dl > div { grid-template-columns: 1fr; gap: 3px; }
  .quote-modal-success { min-height: 420px; padding: 58px 28px; }
}

@media (max-width: 420px) {
  .quote-modal { padding: 16px; }
  .quote-modal-dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
  .quote-modal-form-state { padding-inline: 20px; }
  .quote-modal h2 { font-size: 34px !important; }
}
