/* Единая форма инженерного расчёта */

.ps-lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(10, 22, 40, 0.72);
  -webkit-overflow-scrolling: touch;
}

.ps-lead-overlay[hidden] {
  display: none !important;
}

body.ps-lead-open {
  overflow: hidden;
}

.ps-lead-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 24px auto 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  padding: 28px 24px 24px;
}

.ps-lead-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
}

.ps-lead-close:hover,
.ps-lead-close:focus {
  color: #1a2a4a;
}

.ps-lead-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0066cc;
}

.ps-lead-header h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
  color: #1a2a4a;
  padding-right: 28px;
}

.ps-lead-subtitle {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #555;
}

.ps-lead-outcome {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0f5fb;
  color: #1a2a4a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.ps-lead-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ps-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ps-lead-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.ps-lead-field input,
.ps-lead-field select,
.ps-lead-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
}

.ps-lead-field input:focus,
.ps-lead-field select:focus,
.ps-lead-field textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.ps-lead-field input.is-invalid,
.ps-lead-field select.is-invalid,
.ps-lead-field textarea.is-invalid {
  border-color: #c0392b;
}

.ps-lead-error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-size: 12px;
  color: #c0392b;
}

.ps-lead-consent {
  font-size: 13px;
  color: #555;
  line-height: 1.45;
}

.ps-lead-consent label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.ps-lead-consent input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #0066cc;
}

.ps-lead-consent a {
  color: #0066cc;
}

.ps-lead-form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdecea;
  color: #8a1f11;
  font-size: 14px;
}

.ps-lead-submit {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 14px 18px;
  background: #0066cc;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.ps-lead-submit:hover:not(:disabled) {
  background: #0052a3;
}

.ps-lead-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ps-lead-result {
  text-align: center;
  padding: 12px 4px 4px;
}

.ps-lead-result h2 {
  margin: 0 0 12px;
  color: #1a2a4a;
  font-size: 22px;
}

.ps-lead-result p {
  margin: 0 0 20px;
  color: #555;
  line-height: 1.5;
}

.ps-lead-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: center;
  margin-top: 16px;
}

.ps-lead-secondary .button,
.ps-lead-secondary button {
  font-size: 14px;
}

.ps-lead-strip {
  padding: 48px 0;
  background: #1a2a4a;
  color: #fff;
}

.ps-lead-strip .container,
.ps-lead-strip .block-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}

.ps-lead-strip h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 28px;
  line-height: 1.25;
}

.ps-lead-strip > .container > p,
.ps-lead-strip .ps-lead-strip-text {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.55;
}

.ps-lead-strip-outcomes {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 8px;
}

.ps-lead-strip-outcomes li {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.ps-lead-strip .button-primary {
  background: #f9c100;
  color: #1a1a1a;
  border: none;
}

.ps-lead-strip .button-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.ps-lead-strip .button-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@media (max-width: 640px) {
  .ps-lead-modal {
    margin: 8px auto 24px;
    padding: 22px 16px 18px;
    border-radius: 12px;
  }

  .ps-lead-header h2 {
    font-size: 20px;
  }

  .ps-lead-grid {
    grid-template-columns: 1fr;
  }

  .ps-lead-strip h2 {
    font-size: 22px;
  }

  .header-cta .button {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* --- Line configurator wizard --- */

.ps-lead-modal--wide {
  max-width: 640px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ps-cfg {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-cfg-intro h2 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #1a2a4a;
}

.ps-cfg-intro p {
  margin: 0;
  color: #5c6b7a;
  line-height: 1.5;
}

.ps-cfg-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1a2a4a;
  margin-bottom: 8px;
}

.ps-cfg-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e6edf5;
  overflow: hidden;
}

.ps-cfg-progress-bar {
  height: 100%;
  background: #0066cc;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.ps-cfg-progress-dots {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.ps-cfg-progress-dots li {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: #d5dbe3;
}

.ps-cfg-progress-dots li.is-active,
.ps-cfg-progress-dots li.is-done {
  background: #0066cc;
}

.ps-cfg-step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #1a2a4a;
}

.ps-cfg-hint {
  margin: 0 0 12px;
  font-size: 14px;
  color: #5c6b7a;
}

.ps-cfg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ps-cfg-options--stack {
  flex-direction: column;
}

.ps-cfg-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #1a2a4a;
  line-height: 1.3;
}

.ps-cfg-chip:hover,
.ps-cfg-chip:focus-within {
  border-color: #0066cc;
}

.ps-cfg-chip:has(input:checked) {
  border-color: #0066cc;
  background: #f0f5fb;
}

.ps-cfg-chip input {
  width: 18px;
  height: 18px;
  accent-color: #0066cc;
  flex-shrink: 0;
}

.ps-cfg-field {
  margin-top: 12px;
}

.ps-cfg-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.ps-cfg-field input,
.ps-cfg-field select,
.ps-cfg-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

.ps-cfg-field input:focus,
.ps-cfg-field select:focus,
.ps-cfg-field textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.ps-cfg-field input.is-invalid,
.ps-cfg-field textarea.is-invalid {
  border-color: #c0392b;
}

.ps-cfg-speed {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.ps-cfg-check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  font-size: 14px;
  cursor: pointer;
}

.ps-cfg-error {
  display: block;
  min-height: 0;
  margin-top: 8px;
  font-size: 13px;
  color: #c0392b;
}

.ps-cfg-summary {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 10px;
  background: #f5f7fa;
  border: 1px solid #dde3ea;
}

.ps-cfg-summary h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.ps-cfg-summary dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.ps-cfg-summary dl > div {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr;
  gap: 8px;
  font-size: 14px;
}

.ps-cfg-summary dt {
  font-weight: 600;
  color: #1a2a4a;
}

.ps-cfg-summary dd {
  margin: 0;
  color: #5c6b7a;
}

.ps-cfg-summary-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: #5c6b7a;
  line-height: 1.45;
}

.ps-cfg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ps-cfg-consent {
  margin-top: 12px;
  font-size: 13px;
  color: #555;
  line-height: 1.45;
}

.ps-cfg-consent label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.ps-cfg-consent input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #0066cc;
}

.ps-cfg-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

.ps-cfg-nav .button {
  min-width: 120px;
}

.ps-cfg-inline {
  padding: 48px 0;
  background: #f5f7fa;
}

.ps-cfg-inline-card {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 16px;
  padding: 24px;
}

.ps-cfg-inline-success,
.ps-cfg-inline-error {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.5;
}

.ps-cfg-inline-success {
  background: #eaf7ef;
  color: #1e6b3a;
}

.ps-cfg-inline-error {
  background: #fdecea;
  color: #8a1f11;
}

@media (max-width: 640px) {
  .ps-cfg-speed,
  .ps-cfg-grid,
  .ps-cfg-summary dl > div {
    grid-template-columns: 1fr;
  }

  .ps-cfg-nav {
    justify-content: stretch;
  }

  .ps-cfg-nav .button {
    flex: 1;
  }
}

/* Fallback when :has() unsupported — still usable via focus */
@supports not selector(:has(*)) {
  .ps-cfg-chip input:checked {
    outline: 2px solid #0066cc;
  }
}
