:root {
  --swpc-bg: #f6f8fb;
  --swpc-panel: #ffffff;
  --swpc-ink: #102033;
  --swpc-muted: #66748a;
  --swpc-line: #dfe6ef;
  --swpc-soft: #eef3f9;
  --swpc-blue: #0f3d73;
  --swpc-blue-soft: #e8f1fb;
  --swpc-green: #0f766e;
  --swpc-red: #b42318;
  --swpc-radius: 18px;
  --swpc-shadow: 0 16px 45px rgba(15, 35, 64, .09);
}

.swpc-configurator {
  margin: 28px 0;
  color: var(--swpc-ink);
  font-family: inherit;
}

.swpc-shell {
  background: var(--swpc-bg);
  border: 1px solid var(--swpc-line);
  border-radius: 24px;
  padding: 22px;
}

.swpc-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.swpc-kicker {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--swpc-blue);
}

.swpc-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
}

.swpc-subtitle {
  margin: 8px 0 0;
  color: var(--swpc-muted);
  max-width: 680px;
}

.swpc-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 22px;
}

.swpc-step {
  border: 1px solid var(--swpc-line);
  background: var(--swpc-panel);
  border-radius: 999px;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--swpc-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.swpc-step span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--swpc-soft);
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.swpc-step.is-active {
  color: var(--swpc-blue);
  border-color: rgba(15,61,115,.35);
  box-shadow: 0 8px 22px rgba(15,61,115,.08);
}

.swpc-step.is-active span:first-child {
  color: #fff;
  background: var(--swpc-blue);
}

.swpc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}

.swpc-card,
.swpc-summary {
  background: var(--swpc-panel);
  border: 1px solid var(--swpc-line);
  border-radius: var(--swpc-radius);
  box-shadow: var(--swpc-shadow);
}

.swpc-card {
  padding: 22px;
}

.swpc-summary {
  padding: 20px;
  position: sticky;
  top: 24px;
}

.swpc-section-title {
  margin: 0 0 6px;
  font-size: 22px;
}

.swpc-section-note {
  margin: 0 0 18px;
  color: var(--swpc-muted);
}

.swpc-fields {
  display: grid;
  gap: 18px;
}

.swpc-field-label {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
}

.swpc-help {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: var(--swpc-soft);
  color: var(--swpc-muted);
  cursor: help;
}

.swpc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.swpc-option {
  appearance: none;
  width: 100%;
  min-height: 72px;
  padding: 13px;
  border: 1px solid var(--swpc-line);
  border-radius: 16px;
  background: #fff;
  color: var(--swpc-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.swpc-option:hover:not(:disabled) {
  border-color: rgba(15,61,115,.38);
  transform: translateY(-1px);
}

.swpc-option.is-selected {
  border-color: var(--swpc-blue);
  background: var(--swpc-blue-soft);
  box-shadow: 0 0 0 3px rgba(15,61,115,.08);
}

.swpc-option:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.swpc-option-code {
  display: block;
  font-weight: 800;
  font-size: 15px;
}

.swpc-option-label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--swpc-muted);
}

.swpc-input {
  width: 100%;
  border: 1px solid var(--swpc-line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  min-height: 46px;
}

.swpc-input-wrap {
  position: relative;
}

.swpc-unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--swpc-muted);
  font-size: 13px;
}

.swpc-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.swpc-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.swpc-btn-primary {
  background: var(--swpc-blue);
  color: #fff;
}

.swpc-btn-secondary {
  background: #fff;
  border-color: var(--swpc-line);
  color: var(--swpc-ink);
}

.swpc-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.swpc-summary h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.swpc-code {
  background: #0e1726;
  color: #e7eefb;
  border-radius: 14px;
  padding: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
  min-height: 47px;
}

.swpc-status {
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--swpc-line);
  background: var(--swpc-soft);
  font-size: 14px;
}

.swpc-status.is-ok {
  border-color: rgba(15,118,110,.32);
  background: #ecfdf5;
}

.swpc-status.is-warn {
  border-color: rgba(180,35,24,.25);
  background: #fff1f0;
}

.swpc-status strong {
  display: block;
  margin-bottom: 4px;
}

.swpc-price {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 800;
}

.swpc-selected-list {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.swpc-selected-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--swpc-line);
  padding-top: 8px;
}

.swpc-selected-row span:first-child {
  color: var(--swpc-muted);
}

.swpc-loading,
.swpc-error {
  padding: 18px;
  border: 1px solid var(--swpc-line);
  border-radius: var(--swpc-radius);
  background: #fff;
}

@media (max-width: 860px) {
  .swpc-shell { padding: 14px; }
  .swpc-header { display: block; }
  .swpc-stepper { grid-template-columns: 1fr; }
  .swpc-grid { grid-template-columns: 1fr; }
  .swpc-summary { position: static; }
  .swpc-card { padding: 18px; }
}

.swpc-add-cart,
.swpc-final-add {
  width: 100%;
  margin-top: 14px;
}

/* v1.1.2: clearer step/field separation + quote request flow */
.swpc-step { position: relative; overflow: hidden; }
.swpc-step::before {
  content: "";
  width: 4px;
  align-self: stretch;
  border-radius: 999px;
  background: var(--swpc-step-accent, var(--swpc-blue));
  opacity: .55;
}
.swpc-step--modell { --swpc-step-accent: #0f3d73; }
.swpc-step--tilkobling { --swpc-step-accent: #2563eb; }
.swpc-step--material { --swpc-step-accent: #0f766e; }
.swpc-step--instrument { --swpc-step-accent: #7c3aed; }
.swpc-step--summary { --swpc-step-accent: #b45309; }
.swpc-step.is-active { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--swpc-step-accent, var(--swpc-blue)) 8%, #fff)); }
.swpc-step.is-active span:first-child { background: var(--swpc-step-accent, var(--swpc-blue)); }

.swpc-card { border-top: 5px solid var(--swpc-card-accent, var(--swpc-blue)); }
.swpc-card--modell { --swpc-card-accent: #0f3d73; }
.swpc-card--tilkobling { --swpc-card-accent: #2563eb; }
.swpc-card--material { --swpc-card-accent: #0f766e; }
.swpc-card--instrument { --swpc-card-accent: #7c3aed; }
.swpc-card--summary { --swpc-card-accent: #b45309; }

.swpc-field {
  padding: 16px;
  border: 1px solid rgba(223,230,239,.9);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, rgba(246,248,251,.72));
}
.swpc-field + .swpc-field { margin-top: 2px; }
.swpc-field.is-next-target {
  box-shadow: 0 0 0 4px rgba(15,61,115,.11), var(--swpc-shadow);
  border-color: rgba(15,61,115,.36);
}
.swpc-field-label { margin-bottom: 12px; }

.swpc-quote {
  margin-top: 14px;
  border-top: 1px solid var(--swpc-line);
  padding-top: 14px;
}
.swpc-quote-toggle { width: 100%; }
.swpc-quote-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.swpc-quote-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--swpc-muted);
  font-weight: 700;
}
.swpc-quote-form textarea.swpc-input {
  resize: vertical;
  min-height: 76px;
}
.swpc-inline-ok,
.swpc-inline-error {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.swpc-inline-ok {
  background: #ecfdf5;
  color: var(--swpc-green);
  border: 1px solid rgba(15,118,110,.24);
}
.swpc-inline-error {
  background: #fff1f0;
  color: var(--swpc-red);
  border: 1px solid rgba(180,35,24,.24);
}


/* v1.1.3: compact quote request, single form only in final step */
.swpc-summary-quote { width: 100%; margin: 10px 0 6px; }
.swpc-quote--compact { margin-top: 14px; padding: 16px; border: 1px solid #dbe5f2; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(15, 36, 66, .06); }
.swpc-quote-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.swpc-quote-head strong { font-size: 15px; color: #0f1f33; }
.swpc-quote-head span { font-size: 12px; color: #5f6f86; }
.swpc-quote-form--compact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) auto; gap: 10px; align-items: end; }
.swpc-quote-form--compact label { margin: 0; font-size: 12px; color: #47556a; font-weight: 650; }
.swpc-muted { color: #7c8ca3; font-weight: 500; }
.swpc-quote-form--compact .swpc-btn { min-height: 42px; white-space: nowrap; }
@media (max-width: 760px) {
  .swpc-quote-form--compact { grid-template-columns: 1fr; }
}

/* v1.1.4: quote request is collapsed by default to avoid form overload */
.swpc-quote-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: #fff;
}
.swpc-quote-mini span {
  color: #526178;
  font-size: 13px;
  font-weight: 650;
}
.swpc-quote--minimal {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 36, 66, .06);
}
.swpc-quote-form--minimal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.swpc-quote-form--minimal label,
.swpc-quote-phone label {
  margin: 0;
  font-size: 12px;
  color: #47556a;
  font-weight: 650;
}
.swpc-quote-secondary {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0b4b89;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 0 0;
  cursor: pointer;
}
.swpc-quote-phone { margin-top: 8px; }
@media (max-width: 760px) {
  .swpc-quote-mini,
  .swpc-quote-form--minimal { grid-template-columns: 1fr; align-items: stretch; }
  .swpc-quote-mini { display: grid; }
}


/* v1.1.5: quote form is main-panel only; summary/right column stays configuration-only */
.swpc-summary .swpc-quote,
.swpc-summary .swpc-quote-mini,
.swpc-summary [data-quote-field],
.swpc-summary [data-quote-send] {
  display: none !important;
}
.swpc-card--summary .swpc-quote {
  border: 1px solid #d8e3f2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 18px;
  padding: 16px;
  margin-top: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.swpc-card--summary .swpc-quote-head strong { color: #0f172a; }
.swpc-card--summary .swpc-quote-head span { color: #64748b; }
.swpc-card--summary .swpc-quote-form--minimal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.swpc-card--summary .swpc-quote-form--minimal label { margin: 0; }
@media (max-width: 760px) {
  .swpc-card--summary .swpc-quote-form--minimal { grid-template-columns: 1fr; }
}


/* v1.1.7: customer visual polish + section readability pass */
.swpc-shell {
  background:
    radial-gradient(circle at 20% 0%, rgba(37,99,235,.05), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
}

.swpc-stepper {
  align-items: stretch;
}

.swpc-step {
  min-height: 42px;
  box-shadow: 0 1px 0 rgba(15,35,64,.04);
}

.swpc-step.is-complete:not(.is-active) {
  border-color: rgba(15,118,110,.22);
  color: #0f5f59;
  background: linear-gradient(180deg, #ffffff 0%, #f2fbf8 100%);
}

.swpc-step.is-complete:not(.is-active) span:first-child {
  background: #dff7ef;
  color: #0f766e;
}

.swpc-step.is-locked {
  opacity: .62;
}

.swpc-card {
  overflow: hidden;
}

.swpc-card::before {
  content: "";
  display: block;
  height: 0;
}

.swpc-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.swpc-section-title::before {
  content: "";
  width: 10px;
  height: 24px;
  border-radius: 999px;
  background: var(--swpc-card-accent, var(--swpc-blue));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--swpc-card-accent, var(--swpc-blue)) 12%, transparent);
}

.swpc-fields {
  gap: 14px;
}

.swpc-field {
  position: relative;
  padding: 17px 18px 18px 20px;
  border-color: #dbe5f2;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 24px rgba(15, 35, 64, .035);
}

.swpc-field::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--swpc-card-accent, var(--swpc-blue));
  opacity: .34;
}

.swpc-field.is-filled {
  border-color: color-mix(in srgb, var(--swpc-card-accent, var(--swpc-blue)) 30%, #dbe5f2);
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--swpc-card-accent, var(--swpc-blue)) 5%, #ffffff) 100%);
}

.swpc-field.is-filled::before {
  opacity: .78;
}

.swpc-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.swpc-field-label {
  margin-bottom: 0;
  font-size: 15px;
}

.swpc-required {
  color: #b42318;
  font-weight: 800;
}

.swpc-field-state {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #0f766e;
  background: #e9fbf5;
  border: 1px solid rgba(15,118,110,.16);
  border-radius: 999px;
  padding: 4px 8px;
}

.swpc-options {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.swpc-option {
  min-height: 64px;
  padding: 12px 13px;
  border-color: #d9e4f1;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.swpc-option.is-selected {
  background: linear-gradient(180deg, color-mix(in srgb, var(--swpc-card-accent, var(--swpc-blue)) 12%, #fff) 0%, #fff 100%);
  border-color: var(--swpc-card-accent, var(--swpc-blue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swpc-card-accent, var(--swpc-blue)) 14%, transparent);
}

.swpc-option-code {
  font-size: 15px;
}

.swpc-option-label {
  font-size: 12px;
  line-height: 1.25;
}

.swpc-input:focus,
.swpc-option:focus-visible,
.swpc-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--swpc-card-accent, var(--swpc-blue)) 28%, transparent);
  outline-offset: 2px;
}

.swpc-summary {
  box-shadow: 0 16px 40px rgba(15, 35, 64, .08);
}

.swpc-summary h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swpc-summary h3::before {
  content: "";
  width: 8px;
  height: 20px;
  border-radius: 999px;
  background: #b45309;
}

.swpc-code {
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.swpc-selected-list {
  max-height: 465px;
  overflow: auto;
  padding-right: 3px;
}

.swpc-selected-row strong {
  text-align: right;
}

.swpc-quote-mini {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.swpc-card--summary .swpc-quote {
  max-width: 100%;
}

.swpc-card--summary .swpc-quote-form--minimal {
  grid-template-columns: minmax(0, 1fr) auto;
}

.swpc-card--summary .swpc-quote .swpc-input {
  min-height: 50px;
}

.swpc-inline-ok,
.swpc-inline-error {
  margin-top: 10px;
}

@media (max-width: 1100px) {
  .swpc-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .swpc-options { grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); }
}

@media (max-width: 860px) {
  .swpc-stepper { grid-template-columns: 1fr 1fr; }
  .swpc-step { min-width: 0; }
  .swpc-summary { order: -1; }
  .swpc-selected-list { max-height: none; }
}

@media (max-width: 560px) {
  .swpc-stepper { grid-template-columns: 1fr; }
  .swpc-options { grid-template-columns: 1fr 1fr; }
  .swpc-card--summary .swpc-quote-form--minimal { grid-template-columns: 1fr; }
}
