/* ============================================================
   UPH Quote Form — wszystkie style scopowane pod .uph-quote
   ============================================================ */
.uph-quote {
  --uph-accent: #1E6FD9;
  --uph-accent-dark: #1556AC;
  --uph-bg: #F8FAFC;
  --uph-card: #ffffff;
  --uph-text: #0F1B2D;
  --uph-muted: #64748B;
  --uph-border: #E2E8F0;
  --uph-subtle: #F1F5F9;
  --uph-radius: 22px;
  --uph-radius-sm: 12px;

  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--uph-text);
  max-width: 720px;
  margin: 0 auto;
  background: var(--uph-bg);
  padding: 40px 20px;
  box-sizing: border-box;
}
.uph-quote *, .uph-quote *::before, .uph-quote *::after { box-sizing: border-box; }

/* --- Step badge --- */
.uph-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--uph-border);
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--uph-text);
}
.uph-badge::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--uph-accent);
}

/* --- Karta --- */
.uph-card {
  background: var(--uph-card);
  border: 1px solid var(--uph-border);
  border-radius: var(--uph-radius);
  padding: 36px;
  box-shadow: 0 30px 70px -30px rgba(15, 30, 60, 0.18);
}
@media (max-width: 640px) {
  .uph-quote {
    padding: 16px 12px;
  }
  .uph-card {
    padding: 22px 18px;
    border-radius: 18px;
  }
  .uph-badge {
    font-size: 11px;
    padding: 7px 12px;
  }
  .uph-step-title { font-size: 19px; }
  .uph-step-sub { font-size: 13px; margin-bottom: 20px; }

  /* Krok 1 — usługi w jednej kolumnie, czytelniej */
  .uph-services { grid-template-columns: 1fr !important; }
  .uph-service-label { font-size: 14px; }

  /* Krok 2 — chipsy lżej, input nie za duży */
  .uph-input { font-size: 16px; padding: 12px 14px; } /* 16px = iOS nie zoom-uje */
  .uph-input.has-suffix { padding-right: 44px; }
  .uph-chip { padding: 7px 12px; font-size: 13px; }

  /* Nawigacja — pełna szerokość, primary szerszy */
  .uph-nav {
    margin-top: 24px;
    gap: 8px;
  }
  .uph-btn, .uph-btn-primary {
    padding: 13px 16px;
    flex: 1;
    justify-content: center;
    font-size: 14px;
  }

  /* Stopka — kompaktowa */
  .uph-foot { padding: 12px; font-size: 12.5px; }
  .uph-foot-icon { width: 26px; height: 26px; }

  /* Sukces */
  .uph-success-icon { width: 72px; height: 72px; margin-bottom: 18px; }
  .uph-success-title { font-size: 22px; }
  .uph-success-text { font-size: 14.5px; margin-bottom: 22px; }
  .uph-summary { padding: 16px; }
  .uph-summary-row { font-size: 13px; }
  .uph-success-cta { flex-direction: column-reverse; gap: 8px; }
  .uph-success-cta .uph-btn,
  .uph-success-cta .uph-btn-primary { width: 100%; }
}

@media (max-width: 380px) {
  .uph-card { padding: 18px 14px; }
  .uph-btn, .uph-btn-primary { padding: 12px 10px; font-size: 13.5px; }
}

/* --- Progres --- */
.uph-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.uph-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--uph-border);
  transition: background 0.25s ease;
}
.uph-progress-bar.is-active { background: var(--uph-accent); }
.uph-progress-label {
  font-size: 12px;
  color: var(--uph-muted);
  margin-left: 8px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Tytuły --- */
.uph-step-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  color: var(--uph-text);
  line-height: 1.2;
}
.uph-step-sub {
  font-size: 14px;
  color: var(--uph-muted);
  margin: 0 0 24px;
}

/* --- Show/hide kroków --- */
.uph-step { display: none; }
.uph-step.is-active { display: block; }

/* --- Krok 1: usługi --- */
.uph-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.uph-service {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--uph-radius-sm);
  border: 1.5px solid var(--uph-border);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s ease;
  position: relative;
  width: 100%;
}
.uph-service:hover:not(.is-selected) {
  border-color: var(--uph-accent);
  background: color-mix(in srgb, var(--uph-accent) 3%, #fff);
}
.uph-service.is-selected {
  border-color: var(--uph-accent);
  background: color-mix(in srgb, var(--uph-accent) 5%, #fff);
}
.uph-service-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--uph-accent) 8%, #fff);
  color: var(--uph-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.uph-service.is-selected .uph-service-icon {
  background: var(--uph-accent);
  color: #fff;
}
.uph-service-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--uph-text);
  line-height: 1.3;
}
.uph-service-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--uph-accent);
  color: #fff;
  display: none;
  place-items: center;
}
.uph-service.is-selected .uph-service-check { display: grid; }

/* --- Pola --- */
.uph-field { margin-bottom: 18px; }
.uph-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--uph-text);
  margin-bottom: 8px;
}
.uph-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--uph-radius-sm);
  border: 1.5px solid var(--uph-border);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--uph-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.uph-input:focus {
  border-color: var(--uph-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--uph-accent) 15%, transparent);
}
.uph-input-wrap { position: relative; }
.uph-input-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--uph-muted);
  font-weight: 600;
  pointer-events: none;
}
.uph-input.has-suffix { padding-right: 50px; }

/* --- Chipsy --- */
.uph-chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.uph-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--uph-border);
  background: #fff;
  color: var(--uph-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.uph-chip:hover:not(.is-active) {
  border-color: var(--uph-accent);
  background: color-mix(in srgb, var(--uph-accent) 6%, #fff);
}
.uph-chip.is-active {
  background: color-mix(in srgb, var(--uph-accent) 10%, #fff);
  color: var(--uph-accent);
  border-color: var(--uph-accent);
}

/* --- Info box --- */
.uph-info {
  padding: 14px;
  border-radius: var(--uph-radius-sm);
  background: var(--uph-subtle);
  border: 1px solid var(--uph-border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.uph-info-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: #fff;
  color: var(--uph-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--uph-border);
}
.uph-info-text {
  font-size: 13px;
  color: var(--uph-muted);
  line-height: 1.55;
}

/* --- Zgoda RODO --- */
.uph-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
}
.uph-consent input { position: absolute; opacity: 0; pointer-events: none; }
.uph-consent-box {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--uph-border);
  background: #fff;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s;
}
.uph-consent input:checked + .uph-consent-box {
  background: var(--uph-accent);
  border-color: var(--uph-accent);
}
.uph-consent-box svg { opacity: 0; transition: opacity 0.15s; }
.uph-consent input:checked + .uph-consent-box svg { opacity: 1; }
.uph-consent-text {
  font-size: 12.5px;
  color: var(--uph-muted);
  line-height: 1.55;
}
.uph-consent-text a { color: var(--uph-accent); font-weight: 600; text-decoration: none; }

/* --- Nawigacja --- */
.uph-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  gap: 10px;
}
.uph-btn {
  padding: 14px 22px;
  border-radius: var(--uph-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1.5px solid var(--uph-border);
  background: transparent;
  color: var(--uph-text);
  transition: all 0.15s;
}
.uph-btn:hover:not(:disabled) {
  border-color: var(--uph-accent);
  background: color-mix(in srgb, var(--uph-accent) 6%, #fff);
  color: var(--uph-text);
}
.uph-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--uph-accent) 30%, transparent);
  outline-offset: 2px;
}
.uph-btn:disabled { opacity: 0.5; cursor: not-allowed; color: #CBD5E1; }
.uph-quote .uph-btn-primary {
  padding: 14px 26px;
  border-radius: var(--uph-radius-sm);
  background: var(--uph-accent) !important;
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 10px 24px -10px var(--uph-accent);
  transition: all 0.15s;
}
.uph-quote .uph-btn-primary:hover {
  background: var(--uph-accent-dark) !important;
  color: #fff;
  box-shadow: 0 14px 28px -10px var(--uph-accent);
  transform: translateY(-1px);
}
.uph-btn-primary:active { transform: translateY(0); }
.uph-btn-primary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--uph-accent) 35%, transparent);
  outline-offset: 2px;
}
.uph-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- Stopka --- */
.uph-foot {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--uph-radius-sm);
  background: #fff;
  border: 1px solid var(--uph-border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--uph-muted);
}
.uph-foot-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--uph-accent) 12%, #fff);
  color: var(--uph-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* --- Sukces --- */
.uph-success { text-align: center; padding: 12px 0; }
.uph-success-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--uph-accent) 12%, #fff);
  color: var(--uph-accent);
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  position: relative;
}
.uph-success-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--uph-accent) 15%, transparent);
}
.uph-success-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  color: var(--uph-text);
}
.uph-success-text {
  color: var(--uph-muted);
  font-size: 16px;
  margin: 0 0 28px;
  line-height: 1.6;
}
.uph-success-text b { color: var(--uph-text); }
.uph-summary {
  display: grid;
  gap: 10px;
  text-align: left;
  padding: 20px;
  border-radius: 14px;
  background: var(--uph-subtle);
  margin-bottom: 24px;
}
.uph-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  padding: 2px 0;
}
.uph-summary-label { color: var(--uph-muted); }
.uph-summary-value { font-weight: 600; color: var(--uph-text); }
.uph-success-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Loading + error --- */
.uph-quote.is-loading .uph-card { opacity: 0.6; pointer-events: none; }
.uph-error {
  background: #FEE2E2;
  color: #991B1B;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.uph-error.is-visible { display: block; }

/* --- Ukryj badge reCAPTCHA na froncie (opcjonalnie) --- */
.grecaptcha-badge { visibility: hidden; }
