/* Request Quote form styles shared by every page: the success toast and the header popup
 * form (#contactModal, built by frontend/partials/quote_form). Loaded by frontend/partials/header.
 * The Request Quote page form itself is styled by request-quote.css.
 */

/* Success toast (top-right, below the fixed header), shown after a quote request is saved and
 * emailed. Fixed position, so no layout shifts. */
.rq-toast {
  position: fixed;
  top: 110px;
  right: 24px;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 400px;
  max-width: calc(100vw - 32px);
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  background: #1a9e5c;
  box-shadow: 0 12px 32px rgba(15, 60, 35, 0.28);
  color: #fff;
  font: 16px/23px "Helvetica";
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.rq-toast.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}
.rq-toast-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #1a9e5c;
}
.rq-toast-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.rq-toast-text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
  overflow-wrap: anywhere;
}
.rq-toast-close {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: 24px/1 "Helvetica";
  cursor: pointer;
  opacity: 0.85;
}
.rq-toast-close:hover,
.rq-toast-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .rq-toast,
  .rq-toast.is-visible {
    transition: none;
  }
}

@media screen and (max-width: 767px) {
  .rq-toast {
    top: 90px;
    right: 16px;
  }
}

@media screen and (max-width: 575px) {
  .rq-toast {
    top: 84px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    font-size: 15px;
    line-height: 22px;
  }
}

/* Header popup form: states the static popup design did not have */
.contact-modal .contact-right .field-error {
  display: block;
  margin: 4px 0 0;
  color: #e00036;
  font: 13px/18px "Helvetica";
}
.contact-modal .contact-right .field-error:empty {
  display: none;
}
/* Inputs carry a 22px bottom margin: their message sits just below the line */
.contact-modal .contact-right form > input + .field-error,
.contact-modal .contact-right .form-row + .field-error,
.contact-modal .contact-right .form-row + .field-error + .field-error {
  margin: -18px 0 14px;
}
.contact-modal .contact-right .form-row + .field-error:not(:empty) + .field-error {
  margin-top: -10px;
}
/* A dropdown beside an input (Country) takes the input's half of the row, as the popup's
   inputs do; the design stacks the row on small screens */
.contact-modal .contact-right .form-row input + .drop-down-form {
  width: 50%;
}
@media screen and (max-width: 451px) {
  .contact-modal .contact-right .form-row input + .drop-down-form {
    width: 100%;
  }
}
.contact-modal .contact-right .is-invalid,
.contact-modal .contact-right textarea[aria-invalid="true"] {
  border-bottom-color: #e00036;
}
.contact-modal .contact-right .captcha-row input.is-invalid {
  border-color: #e00036;
}
.contact-modal .contact-right .privacy-check a {
  color: inherit;
  text-decoration: underline;
}
.contact-modal .contact-right .captcha-row .captcha-image {
  overflow: hidden;
}
.contact-modal .contact-right .captcha-row .captcha-image img[data-captcha-image] {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}
.contact-modal .contact-right .request-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.contact-modal .contact-right .form-status {
  margin: 12px 0 0;
  color: #e00036;
  font: 14px/20px "Helvetica";
}
.contact-modal .contact-right .form-status:empty {
  display: none;
}
