/* Fill form (permit submission) */
.ptw-form-fill-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ptw-form-fill-shell {
  background: var(--swi-surface);
  border: 1px solid var(--swi-border);
  border-radius: 14px;
  box-shadow: var(--swi-shadow-sm);
  padding: 1.35rem 1.5rem;
}

/* Landing / start screen */
.ptw-form-fill-landing {
  margin-top: 0;
}

.ptw-form-fill-hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.65rem 1.85rem 1.75rem;
  background: var(--swi-surface);
  border: 1px solid var(--swi-border);
  border-radius: 16px;
  box-shadow: var(--swi-shadow-sm);
}

.ptw-form-fill-hero__intro {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 62ch;
}

.ptw-form-fill-hero__badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--swi-text-secondary);
  background: var(--swi-surface-muted);
  border: 1px solid var(--swi-border);
}

.ptw-form-fill-hero__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--swi-text);
  line-height: 1.2;
}

.ptw-form-fill-hero__lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  position: relative;
}

.ptw-form-fill-timeline::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--swi-border);
  z-index: 0;
}

.ptw-form-fill-timeline__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.65rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.ptw-form-fill-timeline__marker {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--swi-text-secondary);
  background: var(--swi-surface);
  border: 2px solid var(--swi-border);
}

.ptw-form-fill-timeline__step.is-active .ptw-form-fill-timeline__marker {
  color: var(--portal-accent-contrast, #fff);
  background: var(--portal-accent, var(--swi-accent));
  border-color: var(--portal-accent, var(--swi-accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--portal-accent, var(--swi-accent)) 18%, transparent);
}

.ptw-form-fill-timeline__card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  padding: 0.9rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--swi-border);
  background: var(--swi-surface-muted);
  min-height: 6.5rem;
}

.ptw-form-fill-timeline__step.is-active .ptw-form-fill-timeline__card {
  border-color: color-mix(in srgb, var(--portal-accent, var(--swi-accent)) 28%, var(--swi-border));
  background: color-mix(in srgb, var(--portal-accent, var(--swi-accent)) 4%, var(--swi-surface));
}

.ptw-form-fill-timeline__tag {
  align-self: center;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-timeline__tag--required {
  color: var(--portal-accent, var(--swi-accent));
}

.ptw-form-fill-timeline__card strong {
  font-size: 0.875rem;
  color: var(--swi-text);
}

.ptw-form-fill-timeline__card > span:last-child {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-features {
  list-style: none;
  margin: 0;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  border-radius: 12px;
  border: 1px dashed var(--swi-border);
  background: color-mix(in srgb, var(--swi-surface-muted) 50%, var(--swi-surface));
}

.ptw-form-fill-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-features li strong {
  display: block;
  color: var(--swi-text);
  font-size: 0.8125rem;
}

.ptw-form-fill-features__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--swi-surface);
  border: 1px solid var(--swi-border);
  position: relative;
}

.ptw-form-fill-features__icon--time::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 2px solid var(--swi-text-secondary);
  border-radius: 999px;
}

.ptw-form-fill-features__icon--camera::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.55rem;
  width: 0.85rem;
  height: 0.65rem;
  border: 2px solid var(--swi-text-secondary);
  border-radius: 3px;
}

.ptw-form-fill-features__icon--save::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  width: 0.75rem;
  height: 0.85rem;
  border: 2px solid var(--swi-text-secondary);
  border-radius: 2px;
}

.ptw-form-fill-types {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ptw-form-fill-types__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-types__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ptw-form-fill-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--swi-text);
  background: var(--swi-surface-muted);
  border: 1px solid var(--swi-border);
}

.ptw-form-fill-type-chip em {
  font-style: normal;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-type-chip--primary {
  border-color: color-mix(in srgb, var(--portal-accent, var(--swi-accent)) 30%, var(--swi-border));
  background: color-mix(in srgb, var(--portal-accent, var(--swi-accent)) 6%, var(--swi-surface));
}

.ptw-form-fill-type-chip--primary em {
  color: var(--portal-accent, var(--swi-accent));
}

.ptw-form-fill-hero__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--swi-border);
}

.ptw-form-fill-hero__cta {
  min-width: 15rem;
  padding: 0.7rem 1.4rem;
  font-size: 0.9375rem;
}

.ptw-form-fill-hero__footnote {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--swi-text-secondary);
}

/* Full-width permit hub (general complete / PTW complete) */
.ptw-form-fill-hub {
  width: 100%;
  min-height: calc(100vh - 12rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 3rem);
  gap: 2rem;
}

.ptw-form-fill-hub--success {
  border-color: color-mix(in srgb, #1a6b38 35%, var(--swi-border));
  background: color-mix(in srgb, #1a6b38 4%, var(--swi-surface));
}

.ptw-form-fill-hub__header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.ptw-form-fill-hub__intro {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 72ch;
}

.ptw-form-fill-hub__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--swi-text);
  line-height: 1.2;
}

.ptw-form-fill-hub__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-hub__validity {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-hub__completed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ptw-form-fill-hub__completed li {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--swi-border);
  border-radius: 999px;
  font-size: 0.875rem;
  background: var(--swi-surface-muted);
}

.ptw-form-fill-hub__picker {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: 32rem;
}

.ptw-form-fill-hub__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ptw-form-fill-hub__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-hub__select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
}

.ptw-form-fill-hub__hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-hub__hint--warn {
  color: #9a3412;
}

.ptw-form-fill-hub__empty {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--swi-text-secondary);
}

.ptw-form-fill-hub__empty--inline {
  flex: 1 1 100%;
  margin: 0;
}

.ptw-form-fill-hub__picker {
  animation: ptw-form-fill-hub-picker-in 0.2s ease-out;
}

@keyframes ptw-form-fill-hub-picker-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ptw-form-fill-hub__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

@media (max-width: 900px) {
  .ptw-form-fill-hero {
    padding: 1.35rem 1.25rem;
  }

  .ptw-form-fill-timeline {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .ptw-form-fill-timeline::before {
    display: none;
  }

  .ptw-form-fill-timeline__step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    padding: 0;
  }

  .ptw-form-fill-timeline__card {
    min-height: 0;
    flex: 1;
  }

  .ptw-form-fill-timeline__tag {
    align-self: flex-start;
  }

  .ptw-form-fill-features {
    grid-template-columns: 1fr;
  }

  .ptw-form-fill-hero__cta {
    width: 100%;
  }
}
