.rqp-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rqp-modal.is-open {
  display: flex;
}

.rqp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.rqp-modal__panel {
  position: relative;
  max-width: 1440px;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  padding: 18px 18px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  max-height: calc(100vh - 32px);
  overflow: auto;
}

/* Lock background scroll when modal open */
body.rqp-modal-open {
  overflow: hidden !important;
}

.rqp-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.rqp-modal__title {
  margin: 0 36px 10px 0;
  font-size: 20px;
}

.rqp-modal__meta {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f6f7f7;
  border-radius: 10px;
  font-size: 13px;
}

.rqp-field {
  margin-bottom: 12px;
}

.rqp-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.rqp-field input,
.rqp-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0d4;
  border-radius: 10px;
}

.rqp-actions {
  margin-top: 12px;
}

.rqp-feedback {
  margin-top: 10px;
  font-size: 13px;
}

.rqp-feedback.is-success {
  color: #0a7b34;
}

.rqp-feedback.is-error {
  color: #b32d2e;
}

/* Contact Form 7 styling inside our modal */
#rqp-modal .wpcf7-form {
  margin-top: 10px;
}

#rqp-modal .wpcf7-form label {
  margin: 0;
  max-width: 50%;
  padding: 0 15px;
  font-weight: 500;
  font-size: 14px;
  width: 100%;
}
#rqp-modal .form-box form p > label:nth-last-of-type(1) {
  width: 100%;
  max-width: 100%;
}
#rqp-modal .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 12px;
}

#rqp-modal .wpcf7-text,
#rqp-modal .wpcf7-email,
#rqp-modal .wpcf7-tel,
#rqp-modal .wpcf7-textarea,
#rqp-modal .wpcf7-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0d4;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 14px;
}

#rqp-modal .wpcf7-textarea {
  resize: vertical;
}

#rqp-modal .wpcf7-not-valid-tip {
  color: #b32d2e;
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

#rqp-modal .wpcf7-response-output {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

#rqp-modal .wpcf7 .wpcf7-validation-errors,
#rqp-modal .wpcf7 .wpcf7-mail-sent-ok {
  border: 1px solid rgba(0,0,0,0.08);
}

#rqp-modal .wpcf7-submit {
  padding: 12px 28px;
  display: inline-flex;
  border: 1px solid;
  overflow: hidden;
  border-radius: 50px;
  background-color: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
}

#rqp-modal .wpcf7-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Request a Quote button (product page) - force override theme styles */
.woocommerce .rqp-open-modal,
.woocommerce button.rqp-open-modal,
.woocommerce button.button.alt.rqp-open-modal,
.woocommerce a.rqp-open-modal,
.rqp-open-modal {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 28px !important;
  border-radius: 50px !important;
  border: 1px solid var(--primary-color) !important;
  background-color: var(--primary-color) !important;
  background: var(--primary-color) !important;
  color: var(--white-color) !important;
  font-weight: 600 !important;
  font-size: 20px;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease !important;
  background-image: none !important;
}

.woocommerce .rqp-open-modal:hover,
.woocommerce .rqp-open-modal:focus,
.woocommerce button.rqp-open-modal:hover,
.woocommerce button.rqp-open-modal:focus,
.rqp-open-modal:hover,
.rqp-open-modal:focus {
  background-color: transparent !important;
  background: transparent !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  transform: translateY(0px) !important;
}

/* Read more link on shop/archive loop */
.rqp-quote-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px !important;
  border-radius: 10px;
  border: 1px solid var(--primary-color);
  background: var(--primary-color);
  color: var(--white-color) !important;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.rqp-quote-link:hover,
.rqp-quote-link:focus {
  background: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color) !important;
  transform: translateY(0px);
}