/* Shared minimal overrides for public + staff UI.
   Keep this small; prefer utility classes in templates. */

:root {
  --nw-max-width: 1100px;
  --nw-sticky-top: 5.5rem;
  --nw-choice-radius: 0.75rem;
  --nw-ink: #17212b;
  --nw-paper: #f4f1eb;
  --nw-rule: rgba(23, 33, 43, 0.14);
}

.container {
  max-width: var(--nw-max-width);
}

body {
  background: #f8f9fa;
  color: var(--nw-ink);
}

a, button, input, select, textarea {
  scroll-margin-top: 7rem;
}

:focus-visible {
  outline: 3px solid rgba(var(--bs-primary-rgb), 0.35);
  outline-offset: 2px;
}

/* Django default error rendering -> Bootstrap-ish */
.errorlist {
  margin: 0.35rem 0 0;
  padding-left: 0;
  list-style: none;
  color: var(--bs-danger);
  font-size: 0.925rem;
}

.errorlist li {
  margin: 0.1rem 0;
}

/* Public form layout */
.nw-form-shell {
  padding-bottom: 1rem;
}

.nw-form-section {
  border-radius: 1rem;
  border: 1px solid var(--nw-rule);
}

.nw-sticky-summary {
  position: sticky;
  top: var(--nw-sticky-top);
}

.nw-help-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
}

.nw-money {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.nw-hero-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--bs-secondary-color);
  font-size: 0.925rem;
}

.nw-hero-list li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.nw-hero-list li::before {
  content: "✓";
  color: var(--bs-primary);
  font-weight: 700;
}

.nw-step {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-weight: 800;
  flex: 0 0 auto;
  line-height: 1;
}

/* Water consumption choice tiles */
.nw-choice {
  position: relative;
}

input.nw-choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

input.nw-customer-type-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nw-choice-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3.25rem;
  padding: 0.75rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--nw-choice-radius);
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  cursor: pointer;
}

.nw-choice-label:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.45);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

input.nw-choice-input:focus + .nw-choice-label,
input.nw-customer-type-input:focus + .nw-choice-label {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

input.nw-choice-input:checked + .nw-choice-label,
input.nw-customer-type-input:checked + .nw-choice-label {
  border-color: rgba(var(--bs-primary-rgb), 0.85);
  box-shadow: 0 0.5rem 1.25rem rgba(var(--bs-primary-rgb), 0.12);
  background: rgba(var(--bs-primary-rgb), 0.06);
}

.nw-choice-title {
  font-weight: 700;
}

/* Signature pad */
.nw-signature {
  width: 100%;
  max-width: 720px;
}

.nw-signature canvas {
  width: 100%;
  height: 220px;
  display: block;
  touch-action: none;
}

header.bg-white {
  position: sticky;
  top: 0;
  z-index: 1020;
}

main.container {
  background: transparent;
}

.pricing-note {
  font-size: 0.70rem;
  line-height: 1.2;
}

.nw-eyebrow,
.nw-step-kicker {
  color: var(--bs-primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nw-form-hero,
.nw-service-hero {
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.10), transparent 48%),
    var(--nw-paper);
  border: 1px solid var(--nw-rule);
}

.nw-service-card {
  border-top: 4px solid var(--bs-primary) !important;
}

.nw-price-panel,
.nw-price-breakdown {
  border: 1px solid var(--nw-rule);
  background: var(--nw-paper);
}

.nw-process-list {
  list-style: none;
  counter-reset: nw-process;
  padding: 0;
}

.nw-process-list li {
  counter-increment: nw-process;
  position: relative;
  padding: 0 0 1.5rem 3.25rem;
  border-left: 1px solid var(--nw-rule);
  margin-left: 1.1rem;
}

.nw-process-list li::before {
  content: counter(nw-process, decimal-leading-zero);
  position: absolute;
  left: -1.1rem;
  top: -0.15rem;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.nw-process-list li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.nw-form-progress {
  overflow-x: auto;
  padding: 0.25rem;
}

.nw-form-progress ol {
  min-width: 34rem;
}

.nw-form-progress li {
  flex: 1;
  position: relative;
}

.nw-form-progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  height: 1px;
  top: 1rem;
  left: 60%;
  right: -40%;
  background: var(--nw-rule);
}

.nw-form-progress button {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
}

.nw-form-progress button span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.35rem;
  border: 1px solid var(--nw-rule);
  border-radius: 50%;
  background: #fff;
  font-weight: 800;
}

.nw-form-progress button[aria-current="step"] {
  color: var(--bs-primary);
  font-weight: 700;
}

.nw-form-progress button[aria-current="step"] span,
.nw-form-progress button.is-complete span {
  color: #fff;
  border-color: var(--bs-primary);
  background: var(--bs-primary);
}

.nw-enhanced .nw-form-step:not(.is-active) {
  display: none;
}

.nw-review-list dt,
.nw-review-list dd {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--nw-rule);
}

.nw-status-card {
  --nw-status-color: #66717f;
  --nw-status-bg: rgba(102, 113, 127, 0.07);
  border: 1px solid color-mix(in srgb, var(--nw-status-color) 35%, white);
  border-top: 4px solid var(--nw-status-color);
  background: linear-gradient(180deg, var(--nw-status-bg), #fff 72%);
  box-shadow: 0 0.35rem 1rem rgba(26, 38, 51, 0.06);
}

.nw-status-card.is-success {
  --nw-status-color: #16784b;
  --nw-status-bg: rgba(22, 120, 75, 0.10);
}

.nw-status-card.is-warning {
  --nw-status-color: #ad6a00;
  --nw-status-bg: rgba(232, 153, 24, 0.13);
}

.nw-status-card.is-danger {
  --nw-status-color: #b02a37;
  --nw-status-bg: rgba(176, 42, 55, 0.09);
}

.nw-status-card.is-neutral {
  --nw-status-color: #66717f;
  --nw-status-bg: rgba(102, 113, 127, 0.07);
}

.nw-status-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.nw-status-heading .nw-step-kicker {
  color: var(--nw-status-color);
}

.nw-status-dot {
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--nw-status-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--nw-status-color) 30%, white);
}

.nw-status-title {
  display: block;
  color: var(--nw-status-color);
  font-size: 1rem;
  line-height: 1.25;
}

.nw-status-copy {
  margin: 0.55rem 0 0;
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
  line-height: 1.4;
}

.privacy-content {
  max-width: 850px;
  margin-inline: auto;
}

.privacy-content h2 {
  margin-top: 2.25rem;
  font-size: 1.35rem;
}

.privacy-content h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

@media (max-width: 991.98px) {
  .nw-sticky-summary {
    position: static;
  }

  .public-ui .navbar-collapse > .d-flex {
    align-items: stretch !important;
    flex-direction: column;
    padding-bottom: 1rem;
  }
}

@media (max-width: 575.98px) {
  main.container {
    padding-top: 1rem !important;
  }

  .nw-form-hero,
  .nw-service-hero {
    border-radius: 0.75rem !important;
  }

  .nw-form-section .card-body,
  .nw-form-section .card-footer {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .nw-signature canvas {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
