:root {
  --rfq-bg: #f4f6fb;
  --rfq-surface: #ffffff;
  --rfq-surface-alt: #f8faff;
  --rfq-text: #1a234d;
  --rfq-text-muted: #6f7897;
  --rfq-border: #dbe2ee;
  --rfq-border-strong: #cfd8e8;
  --rfq-progress-track: #dde2ea;
  --rfq-progress-fill: #3a78e6;
  --rfq-primary: #356dd6;
  --rfq-primary-hover: #2f61c2;
  --rfq-primary-soft: rgba(53, 109, 214, 0.1);
  --rfq-shadow: 0 24px 64px rgba(27, 39, 94, 0.18);
  --rfq-shadow-soft: 0 14px 30px rgba(27, 39, 94, 0.1);
  --rfq-overlay: rgba(69, 79, 110, 0.42);
  --rfq-danger: #d94a58;
  --rfq-radius-lg: 22px;
  --rfq-radius-md: 16px;
  --rfq-radius-sm: 12px;
  --rfq-transition: 180ms ease;
  --rfq-font: Inter, "Segoe UI", Arial, sans-serif;
  --rfq-modal-width: 920px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--rfq-font);
  color: var(--rfq-text);
  background:
    radial-gradient(circle at top left, rgba(58, 120, 230, 0.08), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #eef3fb 100%);
}

body.rfq-modal-open {
  overflow: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.rfq-demo-shell {
  min-height: 100vh;
  padding: 48px 20px;
  display: grid;
  place-items: center;
}

.rfq-launch-btn {
  min-width: 180px;
}

.rfq-modal-root,
.rfq-exit-dialog {
  position: fixed;
  inset: 0;
}

.rfq-modal-root {
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.rfq-modal-overlay,
.rfq-exit-overlay {
  position: absolute;
  inset: 0;
  background: var(--rfq-overlay);
}

.rfq-modal {
  position: relative;
  z-index: 1;
  width: min(var(--rfq-modal-width), calc(100vw - 32px));
  max-height: calc(var(--rfq-viewport-height, 100dvh) - 32px);
  margin: auto;
  overflow: hidden;
  border-radius: 24px;
  background: var(--rfq-surface);
  box-shadow: var(--rfq-shadow);
  display: flex;
  flex-direction: column;
}

.rfq-close-btn {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 50px;
  height: 57px;
  border: 1px solid rgba(223, 229, 240, 0.92);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #8e96b0;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(24, 38, 86, 0.08);
  transition: transform var(--rfq-transition), background var(--rfq-transition), color var(--rfq-transition);
}

.rfq-close-btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
  color: var(--rfq-text);
}

.rfq-close-btn span {
  font-size: 2rem;
  line-height: 0;
  margin-left: -10px !important;
  margin-top: -4px;
}

.rfq-modal-media {
  min-height: 75px;
  background: linear-gradient(0deg, rgba(14, 26, 74, 0.08), rgba(14, 26, 74, 0.08)), linear-gradient(120deg, #9bc574 0%, #6cae56 18%, #d2b659 38%, #d2625c 58%, #dfc36b 77%, #7eb77a 100%);
  background-image: url(https://kraftcontrol.eu/wp-content/uploads/2026/04/kraftcontrol_transparent.png);
  background-size: cover;
  background-repeat: no-repeat;
  width: 40% !important;
  margin-left: 265px !important;
  margin-top: 25px !important;
}

.rfq-modal-progress {
  padding: 40px 58px 0;
}

.progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--rfq-progress-track);
}

.progress-fill {
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: var(--rfq-progress-fill);
  transition: width 220ms ease;
}

.rfq-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 28px 46px 40px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.form-alert {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--rfq-radius-sm);
  border: 1px solid rgba(217, 74, 88, 0.18);
  background: rgba(217, 74, 88, 0.08);
  color: #a02b41;
  font-size: 0.96rem;
}

.steps-viewport {
  min-height: 420px;
  padding-bottom: 16px;
}

.form-step {
  display: none;
  animation: rfq-fade 180ms ease;
}

.form-step.active {
  display: flex;
  flex-direction: column;
}

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

.step-header {
  max-width: 660px;
  margin: 0 auto 30px;
  text-align: center;
}

.step-badge {
  display: none;
}

.step-header h3 {
  margin: 0 0 10px;
  color: var(--rfq-text);
  font-size: clamp(1.8rem, 1.8vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.step-header p,
.helper-text,
.review-header p,
.upload-list-title,
.summary-label,
.confirmation-number,
.field-help {
  color: var(--rfq-text-muted);
}

.step-header p {
  margin: 0;
  font-size: 1rem;
}

.field-group {
  margin-bottom: -17px;
}

.field-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--rfq-text);
  font-weight: 700;
}

.required {
  color: var(--rfq-primary);
}

.optional {
  color: var(--rfq-text-muted);
  font-weight: 500;
}

.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-card,
.conditional-block,
.component-section,
.review-panel,
.upload-panel,
.submission-summary-block {
  border: 1px solid var(--rfq-border);
  background: var(--rfq-surface);
  border-radius: 18px;
  box-shadow: 0 1px 0 rgba(18, 33, 77, 0.02);
}

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  margin-bottom: 12px;
  padding: 18px 24px;
  cursor: pointer;
  transition: border-color var(--rfq-transition), box-shadow var(--rfq-transition), background var(--rfq-transition);
}

.choice-card:hover {
  border-color: var(--rfq-border-strong);
  box-shadow: var(--rfq-shadow-soft);
}

.choice-card.compact {
  min-height: 66px;
}

.choice-card input[type="radio"] {
  margin: 0;
  width: 21px;
  height: 21px;
  accent-color: var(--rfq-primary);
  flex: 0 0 auto;
}

.choice-card:has(input[type="radio"]:checked) {
  border-color: rgba(53, 109, 214, 0.48);
  background: var(--rfq-surface-alt);
  box-shadow: inset 0 0 0 1px rgba(53, 109, 214, 0.1);
}

.choice-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.choice-title {
  color: #697393;
  font-size: 1rem;
  font-weight: 700;
}

.choice-card:has(input[type="radio"]:checked) .choice-title {
  color: var(--rfq-text);
}

.choice-text {
  color: var(--rfq-text-muted);
  font-size: 0.8rem;
}

.conditional-block,
.component-section,
.review-panel,
.submission-summary-block {
  padding: 22px;
}

.subsection-divider {
  margin-bottom: 18px;
  color: var(--rfq-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.input-control {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--rfq-border);
  border-radius: 14px;
  background: var(--rfq-surface);
  color: var(--rfq-text);
  outline: none;
  transition: border-color var(--rfq-transition), box-shadow var(--rfq-transition), background var(--rfq-transition);
}

.input-control::placeholder {
  color: #97a0ba;
}

.input-control:focus {
  border-color: rgba(53, 109, 214, 0.55);
  box-shadow: 0 0 0 4px rgba(53, 109, 214, 0.1);
  background: #fcfdff;
}

select.input-control {
  appearance: none;
}

.textarea-control {
  min-height: 140px;
  resize: vertical;
}

.error-message {
  min-height: 20px;
  margin: 8px 2px 0;
  color: var(--rfq-danger);
  font-size: 0.9rem;
}

.upload-grid,
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.full-width {
  grid-column: 1 / -1;
}

.upload-panel {
  padding: 20px;
}

.upload-dropzone {
  position: relative;
  min-height: 138px;
  border: 1.5px dashed #c8d4ea;
  border-radius: 16px;
  background: var(--rfq-surface-alt);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  cursor: pointer;
  transition: border-color var(--rfq-transition), background var(--rfq-transition);
}

.upload-dropzone:hover,
.upload-dropzone:focus,
.upload-dropzone.drag-over {
  border-color: rgba(53, 109, 214, 0.55);
  background: #f4f8ff;
  outline: none;
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--rfq-text-muted);
}

.upload-content strong {
  color: var(--rfq-text);
}

.upload-icon {
  display: inline-flex;
  align-self: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(53, 109, 214, 0.08);
  color: var(--rfq-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.upload-list-wrapper {
  margin-top: 14px;
}

.upload-list-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.upload-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--rfq-border);
  border-radius: 12px;
  background: #fbfcfe;
  color: var(--rfq-text);
}

.file-remove-btn {
  border: 0;
  background: transparent;
  color: var(--rfq-primary);
  cursor: pointer;
  font-weight: 700;
}

.review-panel {
  margin-top: 28px;
}

.step-actions-footer {
  margin-top: 32px;
}

.review-header {
  margin-bottom: 14px;
}

.review-header h4,
.review-header h3 {
  margin: 0 0 6px;
  color: var(--rfq-text);
  font-size: 1.1rem;
}

.summary-section + .summary-section {
  margin-top: 18px;
}

.summary-section h5 {
  margin: 0 0 12px;
  color: var(--rfq-text);
  font-size: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-item {
  padding: 14px 16px;
  border: 1px solid var(--rfq-border);
  border-radius: 14px;
  background: #fafcff;
}

.summary-label,
.summary-value {
  display: block;
}

.summary-label {
  margin-bottom: 3px;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-value {
  color: var(--rfq-text);
  word-break: break-word;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
  padding: 15px 24px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(219, 226, 238, 0.92);
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(17, 39, 83, 0.06);
}

.action-right {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.btn {
  appearance: none;
  min-width: 122px;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--rfq-transition), background var(--rfq-transition), color var(--rfq-transition), border-color var(--rfq-transition), box-shadow var(--rfq-transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
    background: #1695a0;
    color: #ffffff;
    border-style: solid;
    border-width: 2px 2px 2px 2px;
    font-size: 1.125rem;
    font-family: 'Karla', sans-serif;
    font-weight: 700;
    line-height: 1.3em;
    letter-spacing: -0.5px;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    border-bottom-left-radius: 50px;
    padding-top: 13px;
    padding-right: 30px;
    padding-bottom: 13px;
    padding-left: 30px;
    box-shadow: none;
}

.btn-primary:hover {
  background: #0C747E;
}

.btn-secondary,
.btn-ghost {
  background: var(--rfq-surface);
  color: var(--rfq-text);
  border-color: var(--rfq-border);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: #fbfcff;
}

.confirmation-screen {
  animation: rfq-fade 180ms ease;
}

.confirmation-card h2 {
  margin: 0 0 14px;
  color: var(--rfq-text);
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  line-height: 1.2;
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(53, 109, 214, 0.1);
  color: var(--rfq-primary);
  font-size: 1.75rem;
  font-weight: 800;
}

.confirmation-number {
  margin: 0 0 24px;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.rfq-exit-dialog {
  z-index: 1010;
}

.rfq-exit-card {
  position: relative;
  z-index: 1;
  width: min(750px, calc(100vw - 32px));
  margin: 18vh auto 0;
  padding: 34px 36px;
  border-radius: 10px;
  background: var(--rfq-surface);
  box-shadow: var(--rfq-shadow);
}

.rfq-exit-card h2 {
  margin: 0 0 24px;
  color: var(--rfq-text);
  font-size: clamp(1.7rem, 1.7vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.btn-secondary, .btn-ghost:hover {
    color: #000000 !important;
}

.rfq-exit-card p {
  max-width: 590px;
  margin: 0 0 36px;
  color: var(--rfq-text);
  font-size: 1rem;
  line-height: 1.45;
  text-align: center;
}

.rfq-exit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rfq-exit-actions {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

@media (max-width: 900px) {
  .rfq-modal {
    width: min(760px, calc(100vw - 24px));
  }

  .upload-grid,
  .details-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .rfq-modal-progress {
    padding: 30px 28px 0;
  }

  .rfq-modal-body {
    padding: 24px 24px 32px;
  }

  .form-actions {
    padding: 18px 20px;
  }
}

@media (max-width: 640px) {
  .rfq-demo-shell {
    padding: 24px 14px;
  }

  .rfq-modal-root {
    align-items: stretch;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .rfq-modal {
    width: calc(100vw - 16px);
    max-height: calc(var(--rfq-viewport-height, 100dvh) - 16px);
    margin: 0 auto;
    border-radius: 18px;
  }

  .rfq-modal-media {
    min-height: 118px;
  }

  .rfq-close-btn {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .step-header h3 {
    font-size: 2rem;
  }

  .choice-card {
    padding: 16px 18px;
    min-height: 72px;
  }

  .rfq-modal-body {
    padding: 20px 18px 24px;
  }

  .steps-viewport {
    min-height: auto;
  }

  .form-actions {
    padding: 16px;
    gap: 12px;
  }

  .form-actions,
  .action-right,
  .confirmation-actions,
  .rfq-exit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-right {
    margin-left: 0;
  }

  .form-actions > .btn,
  .action-right .btn,
  .confirmation-actions .btn,
  .rfq-exit-actions .btn {
    width: 100%;
  }

  .rfq-exit-card {
    margin-top: 12vh;
    padding: 28px 20px;
  }

  .rfq-exit-card p {
    margin-bottom: 28px;
    font-size: 1rem;
  }
}

@media (max-width: 544px) {
.rfq-modal-media
 {
    min-height: 74px;
    background: linear-gradient(0deg, rgba(14, 26, 74, 0.08), rgba(14, 26, 74, 0.08)), linear-gradient(120deg, #9bc574 0%, #6cae56 18%, #d2b659 38%, #d2625c 58%, #dfc36b 77%, #7eb77a 100%);
    background-image: url(https://kraftcontrol.eu/wp-content/uploads/2026/04/kraftcontrol_transparent.png);
    background-size: cover;
    background-repeat: no-repeat;
    width: 85% !important;
    margin-left: 31px !important;
    margin-top: 25px !important;
 }
.rfq-close-btn span {
    font-size: 2rem;
    line-height: 0;
    margin-left: 0px !important;
    margin-top: -4px;
 }
 .step-header h3 {
        font-size: 1.5rem;
    }
}
