/* Quote modal — professional form & result states */
.quote-modal-overlay {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  justify-content: center;
  padding: max(16px, 2vh) 20px;
}

.quote-modal {
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 100%;
  max-height: min(90vh, 680px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.quote-modal--result {
  max-width: 480px;
  max-height: min(85vh, 520px);
}

.quote-modal-header {
  flex-shrink: 0;
  padding: 24px 52px 16px 28px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0;
  background: #fff;
}

.quote-modal-title {
  margin: 0 0 6px;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.quote-modal-subtitle {
  margin: 0 0 20px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.quote-modal-product {
  display: none;
}

.quote-product-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 28px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #166534;
}

.quote-product-badge-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 4px;
}

.quote-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 28px 28px;
  scroll-padding-bottom: 24px;
}

/* Smooth, subtle scrollbar */
.quote-modal-body {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.quote-modal-body::-webkit-scrollbar {
  width: 8px;
}

.quote-modal-body::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}

.quote-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.quote-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  background-clip: padding-box;
}

.quote-modal > .quote-result {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

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

.quote-field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.quote-modal-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

.quote-modal-form input:disabled,
.quote-modal-form select:disabled,
.quote-modal-form textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f8fafc;
}

.quote-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.quote-form-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.quote-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  margin-top: 0;
  padding: 13px 32px;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.quote-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.4);
}

.quote-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: quoteSpin 0.7s linear infinite;
}

@keyframes quoteSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Error alert */
.quote-alert {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 12px;
  animation: quoteAlertIn 0.3s ease;
}

@keyframes quoteAlertIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quote-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.quote-alert-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  border-radius: 50%;
  color: #dc2626;
}

.quote-alert-icon svg {
  width: 22px;
  height: 22px;
}

.quote-alert-title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #991b1b;
}

.quote-alert-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #b91c1c;
}

/* Success result */
.quote-result {
  padding: 36px 28px 32px;
  text-align: center;
  animation: quoteResultIn 0.4s ease;
}

@keyframes quoteResultIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.quote-result-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-radius: 50%;
  color: #16a34a;
}

.quote-result-icon svg {
  width: 40px;
  height: 40px;
}

.quote-result-title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.quote-result-text {
  margin: 0 0 28px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #64748b;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.quote-result-close {
  align-self: center;
  margin: 0 auto;
}

.quote-form-msg {
  display: none;
}

@media (max-width: 480px) {
  .quote-modal-overlay {
    padding: 12px;
  }

  .quote-modal {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }

  .quote-modal-header {
    padding: 20px 48px 14px 20px;
  }

  .quote-modal-body,
  .quote-result {
    padding-left: 20px;
    padding-right: 20px;
  }

  .quote-product-badge {
    padding-left: 20px;
    padding-right: 20px;
  }

  .quote-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .quote-submit-btn {
    width: 100%;
  }
}
