/**
 * RFQ Builder modal — shared styles (scoped to #ks-rfq-root).
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Mono:wght@400;500&display=swap');

#ks-rfq-root {
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --border: #E4E2DC;
  --border-2: #D0CEC8;
  --ink-1: #111110;
  --ink-2: #3D3C39;
  --ink-3: #78776F;
  --ink-4: #A5A39C;
  --gold-light: #F2B800;
  --gold-tint: #FDF4D7;
  --blue: #1A6EF5;
  --red: #DC2626;
  --green: #16A34A;
  --green-tint: #F0FDF4;
  --r-md: 10px;
  --r-xl: 24px;
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  z-index: 2147483000;
}

#ks-rfq-root *,
#ks-rfq-root *::before,
#ks-rfq-root *::after {
  box-sizing: border-box;
}

#ks-rfq-root .ks-modal-overlay {
  position: fixed !important;
  inset: 0;
  z-index: 2147483000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#ks-rfq-root .ks-modal-overlay.ks-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
}

#ks-rfq-root .ks-modal-overlay .ks-modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ks-rfq-root .ks-modal-overlay.ks-open .ks-modal {
  transform: none;
}

#ks-rfq-root .ks-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}

#ks-rfq-root .ks-modal-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-1);
  line-height: 1.15;
}

#ks-rfq-root .ks-modal-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.55;
}

#ks-rfq-root .ks-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

#ks-rfq-root .ks-modal-close:hover {
  background: var(--border);
  color: var(--ink-1);
}

#ks-rfq-root .ks-modal-body {
  padding: 22px 28px 28px;
}

#ks-rfq-root .ks-field-group {
  margin-bottom: 16px;
}

#ks-rfq-root .ks-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#ks-rfq-root .ks-field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

#ks-rfq-root .ks-field-input,
#ks-rfq-root .ks-field-select,
#ks-rfq-root .ks-field-textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  color: var(--ink-1);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

#ks-rfq-root .ks-field-input.ks-field-text,
#ks-rfq-root .ks-field-textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
}

#ks-rfq-root .ks-field-input:focus,
#ks-rfq-root .ks-field-select:focus,
#ks-rfq-root .ks-field-textarea:focus {
  border-color: var(--blue);
  background: #fff;
}

#ks-rfq-root .ks-field-input::placeholder {
  color: var(--ink-4);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
}

#ks-rfq-root .ks-field-select {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2378776F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

#ks-rfq-root .ks-field-textarea {
  resize: vertical;
  min-height: 80px;
}

#ks-rfq-root .ks-field-unit {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 4px;
  line-height: 1.5;
  font-family: 'DM Sans', sans-serif;
}

#ks-rfq-root .ks-rfq-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}

#ks-rfq-root .ks-rfq-step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

#ks-rfq-root .ks-rfq-step.ks-active {
  background: var(--blue);
}

#ks-rfq-root .ks-rfq-step.ks-done {
  background: var(--green);
}

#ks-rfq-root .ks-rfq-page {
  display: none;
}

#ks-rfq-root .ks-rfq-page.ks-active {
  display: block;
}

#ks-rfq-root .ks-rfq-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
}

#ks-rfq-root .ks-rfq-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

#ks-rfq-root .ks-rfq-nav-label {
  font-size: 13px;
  color: var(--ink-4);
}

#ks-rfq-root .rfq-success,
#ks-rfq-root div#ks-rfq-success {
  text-align: center;
  padding: 40px 20px;
}

#ks-rfq-root .rfq-success-icon {
  width: 52px;
  height: 52px;
  background: var(--green-tint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

#ks-rfq-root .rfq-success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-1);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

#ks-rfq-root .rfq-success-body {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 300px;
  margin: 0 auto 20px;
}

#ks-rfq-root .rfq-success-contact {
  font-size: 13px;
  color: var(--ink-4);
}

#ks-rfq-root .rfq-success-contact a {
  color: var(--blue);
  text-decoration: none;
}

#ks-rfq-root .ks-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border-radius: var(--r-md);
}

#ks-rfq-root .ks-btn-md {
  font-size: 14px;
  padding: 9px 18px;
}

#ks-rfq-root .ks-btn-primary {
  background: var(--ink-1);
  color: #fff;
}

#ks-rfq-root .ks-btn-primary:hover {
  background: var(--ink-2);
}

#ks-rfq-root .ks-btn-gold {
  background: var(--gold-light);
  color: var(--ink-1);
  font-weight: 600;
}

#ks-rfq-root .ks-btn-gold:hover {
  background: #e5ab00;
}

#ks-rfq-root .ks-btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--border-2);
}

#ks-rfq-root .ks-btn-ghost:hover {
  border-color: var(--ink-3);
  color: var(--ink-1);
  background: var(--surface);
}

html.ks-rfq-modal-open,
body.ks-rfq-modal-open {
  overflow: hidden !important;
}

@media (max-width: 700px) {
  #ks-rfq-root .ks-field-row {
    grid-template-columns: 1fr;
  }

  #ks-rfq-root .ks-rfq-nav {
    flex-direction: column-reverse;
    gap: 10px;
  }

  #ks-rfq-root .ks-rfq-nav .ks-btn {
    width: 100%;
    justify-content: center;
  }

  #ks-rfq-root .ks-rfq-nav .ks-rfq-nav-label {
    order: 3;
  }

  #ks-rfq-root .ks-modal-header {
    padding: 22px 22px 0;
  }

  #ks-rfq-root .ks-modal-body {
    padding: 18px 22px 24px;
  }
}
