/**
 * Quote request modal
 */

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

.rpt-quote-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

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

.rpt-quote-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 19, 0.78);
}

.rpt-quote-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px 24px 20px;
  background: var(--rpt-surface-container-lowest);
  border-radius: var(--rpt-radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
}

.rpt-quote-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--rpt-radius-full);
  background: rgba(0, 0, 0, 0.06);
  color: var(--rpt-on-surface);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.rpt-quote-modal__close:hover,
.rpt-quote-modal__close:focus-visible {
  background: rgba(0, 0, 0, 0.1);
}

.rpt-quote-modal__header {
  padding-right: 40px;
  margin-bottom: 16px;
}

.rpt-quote-modal__title {
  margin: 0 0 8px;
  font-family: var(--rpt-font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.3;
  font-weight: 700;
  color: var(--rpt-on-surface);
}

.rpt-quote-modal__subtitle {
  margin: 0;
  font-family: var(--rpt-font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--rpt-on-surface-variant);
}

.rpt-quote-modal__product {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(139, 249, 89, 0.35);
  border-radius: var(--rpt-radius-default);
  background: rgba(139, 249, 89, 0.08);
}

.rpt-quote-modal__product-label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--rpt-font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rpt-on-surface-variant);
}

.rpt-quote-modal__product-link {
  font-family: var(--rpt-font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--rpt-industrial-navy);
  text-decoration: none;
  word-break: break-word;
}

.rpt-quote-modal__product-link:hover,
.rpt-quote-modal__product-link:focus {
  color: var(--rpt-electric-green);
}

.rpt-quote-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rpt-quote-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rpt-quote-modal__feedback {
  padding: 12px 14px;
  border-radius: var(--rpt-radius-default);
  font-family: var(--rpt-font-body);
  font-size: 14px;
  line-height: 1.6;
}

.rpt-quote-modal__feedback.is-success {
  background: rgba(139, 249, 89, 0.14);
  color: var(--rpt-industrial-navy);
  border: 1px solid rgba(139, 249, 89, 0.35);
}

.rpt-quote-modal__feedback.is-error {
  background: rgba(229, 57, 53, 0.08);
  color: #b71c1c;
  border: 1px solid rgba(229, 57, 53, 0.25);
}

.rpt-quote-modal__actions {
  position: sticky;
  bottom: 0;
  margin-top: 4px;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--rpt-surface-container-lowest) 24%);
}

.rpt-quote-modal__submit {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
}

button.rpt-product-card__button,
button.rpt-home-product-card__cta,
button.rpt-product-main-cta,
button.rpt-quote-cta {
  appearance: none;
  cursor: pointer;
  font: inherit;
  text-align: center;
}

@media (max-width: 767px) {
  .rpt-quote-modal {
    align-items: flex-end;
    padding: 0;
  }

  .rpt-quote-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: var(--rpt-radius-lg) var(--rpt-radius-lg) 0 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .rpt-quote-modal__actions {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
