/* Wspólne style czterech formularzy; selektory ograniczone do modułu. */
.sc-estimator {
  --sc-blue: #2196ff;
  --sc-blue-hover: #087bdc;
  --sc-text: #0b1c38;
  --sc-muted: #7b8492;
  box-sizing: border-box;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  color: var(--sc-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
  text-align: left;
}

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

.sc-estimator .sc-progress {
  height: 6px;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3e5ea;
}

.sc-estimator .sc-progress-inner {
  width: 0;
  height: 100%;
  background: #111827;
  transition: width 250ms ease;
}

.sc-estimator .sc-hidden {
  display: none !important;
}

.sc-estimator .sc-field {
  min-width: 0;
  margin: 0 0 24px;
}

.sc-estimator .sc-label {
  display: block;
  margin: 0 0 12px;
  color: var(--sc-muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.sc-estimator .sc-field > label:not(.sc-label),
.sc-estimator .sc-multi-2col > label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 28px;
  margin: 0 0 8px;
  color: var(--sc-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  cursor: pointer;
}

.sc-estimator .sc-field > br {
  display: none;
}

.sc-estimator input[type="radio"],
.sc-estimator input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 5px 0 0;
  padding: 0;
  accent-color: var(--sc-blue);
  cursor: pointer;
}

.sc-estimator .sc-select,
.sc-estimator .sc-input,
.sc-estimator .sc-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid #a6adb7;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  color: var(--sc-text);
  font: inherit;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sc-estimator .sc-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  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='%230b1c38' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.sc-estimator .sc-textarea {
  min-height: 120px;
  resize: vertical;
}

.sc-estimator .sc-input::placeholder,
.sc-estimator .sc-textarea::placeholder {
  color: #8b929d;
  opacity: 1;
}

.sc-estimator .sc-select:focus,
.sc-estimator .sc-input:focus,
.sc-estimator .sc-textarea:focus {
  outline: none;
  border-color: var(--sc-blue);
  box-shadow: 0 0 0 3px rgb(33 150 255 / 16%);
}

.sc-estimator .sc-actions {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 0;
}

.sc-estimator .sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  min-height: 54px;
  max-width: 100%;
  margin: 0;
  padding: 13px 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--sc-blue);
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  cursor: pointer;
  transition: background-color 150ms ease, opacity 150ms ease;
}

.sc-estimator .sc-btn:hover:not(:disabled) {
  background: var(--sc-blue-hover);
  color: #fff;
}

.sc-estimator .sc-btn:focus-visible,
.sc-estimator input[type="radio"]:focus-visible,
.sc-estimator input[type="checkbox"]:focus-visible {
  outline: 3px solid #0b1c38;
  outline-offset: 3px;
}

.sc-estimator .sc-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.sc-estimator .sc-btn[data-submit]:disabled {
  cursor: wait;
}

.sc-estimator .sc-error {
  margin: 8px 0 0;
  color: #c62828;
  font-size: 13px;
  line-height: 1.5;
}

.sc-estimator .sc-multi-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 20px;
}

.sc-estimator .sc-result {
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.sc-estimator .sc-result.green {
  border-color: #5cb42d;
  background: #def0d5;
  color: #2f7011;
}

.sc-estimator .sc-result.yellow {
  border-color: #c5ad21;
  background: #f3eed3;
  color: #766312;
}

.sc-estimator .sc-result.red {
  border-color: #b42d2d;
  background: #f4d1d1;
  color: #922323;
}

@media (max-width: 480px) {
  .sc-estimator .sc-multi-2col {
    grid-template-columns: minmax(0, 1fr);
  }

  .sc-estimator .sc-actions {
    gap: 12px;
  }

  .sc-estimator .sc-btn {
    min-width: 96px;
    padding: 12px 20px;
    font-size: 16px;
  }

  .sc-estimator .sc-btn[data-submit] {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-estimator .sc-progress-inner,
  .sc-estimator .sc-select,
  .sc-estimator .sc-input,
  .sc-estimator .sc-textarea,
  .sc-estimator .sc-btn {
    transition: none;
  }
}
