/* ─── BRIEF STEP FORM ─── */
.brief-stepper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.brief-stepper-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.brief-stepper-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brief-stepper-meta strong {
  color: var(--navy);
  font-size: 1rem;
  text-align: right;
}

.brief-stepper p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.brief-stepper .progress-bar {
  margin-bottom: 0;
}

.brief-form--stepped .brief-step[hidden] {
  display: none !important;
}

.brief-form--stepped .brief-step {
  animation: briefStepIn 0.2s ease-out;
}

.brief-step.is-active {
  border-color: rgba(26, 26, 46, 0.18);
  box-shadow: var(--shadow);
}

.field--required > label,
.field-label--required {
  color: var(--navy);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(196, 154, 36, 0.38);
  border-radius: 999px;
  background: rgba(240, 200, 87, 0.18);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  margin-left: 8px;
  padding: 4px 8px;
  text-transform: uppercase;
}

.field--invalid {
  border-left: 3px solid #b42318;
  padding-left: 12px;
}

.field--invalid input,
.field--invalid select,
.field--invalid textarea,
.field-invalid {
  background: #fff7f6 !important;
  border-color: #b42318 !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1) !important;
}

.brief-step-error-summary {
  background: #fff7f6;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-left: 4px solid #b42318;
  border-radius: var(--radius-sm);
  color: #7a271a;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 14px 0 18px;
  padding: 12px 14px;
}

.choice-tags {
  align-items: flex-start !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.choice-tags .choice-tag,
.choice-tags > label {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex !important;
  flex: 0 1 auto !important;
  gap: 6px;
  line-height: 1.2;
  margin: 0 !important;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 12px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  white-space: normal;
  width: auto !important;
}

.choice-tags .choice-tag:hover,
.choice-tags > label:hover {
  border-color: rgba(26, 26, 46, 0.28);
  transform: translateY(-1px);
}

.choice-tags .choice-tag:has(input:checked),
.choice-tags > label:has(input:checked) {
  background: rgba(240, 200, 87, 0.18);
  border-color: var(--gold);
  box-shadow: 0 4px 18px rgba(196, 154, 36, 0.16);
  color: var(--navy);
  font-weight: 900;
}

.choice-tags input[type="radio"],
.choice-tags input[type="checkbox"] {
  accent-color: var(--navy);
  margin: 0;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.choice-tags .choice-tag:focus-within,
.choice-tags > label:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.12);
}

.choice-tags .choice-tag--disabled,
.choice-tags .choice-tag--disabled:hover {
  background: var(--grey);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
}

.field-help--solo-rule {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 8px 0 0;
}

.field-help--minor-warning {
  background: rgba(240, 200, 87, 0.16);
  border: 1px solid rgba(196, 154, 36, 0.28);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 10px 0 0;
  padding: 9px 11px;
}

.brief-draft-notice {
  align-items: center;
  background: rgba(240, 200, 87, 0.15);
  border: 1px solid rgba(196, 154, 36, 0.34);
  border-radius: var(--radius-sm);
  color: var(--navy);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: -6px 0 18px;
  padding: 11px 14px;
}

.brief-draft-notice button {
  background: transparent;
  border: 1px solid rgba(26, 26, 46, 0.22);
  border-radius: 999px;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 10px;
}

.brief-step-actions {
  position: sticky;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 10px 32px rgba(26, 26, 46, 0.12);
  backdrop-filter: blur(10px);
}

.brief-step-btn {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 12px 22px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.brief-step-btn:disabled,
.brief-step-btn[aria-disabled="true"],
.brief-step-actions #submitBtn:disabled,
.brief-step-actions #submitBtn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.brief-step-btn:hover:not(:disabled):not([aria-disabled="true"]) {
  transform: translateY(-1px);
}

.brief-step-btn--primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.18);
}

.brief-step-btn--primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: #2d2d4e;
  box-shadow: 0 8px 26px rgba(26, 26, 46, 0.28);
}

.brief-step-btn--secondary {
  background: var(--grey);
  color: var(--navy);
}

.brief-step-position {
  flex: 1;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.brief-step-actions #submitBtn {
  margin-left: auto;
}

.brief-step-actions [hidden] {
  display: none !important;
}

@keyframes briefStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .brief-stepper {
    padding: 18px;
  }

  .brief-stepper-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .brief-stepper-meta strong {
    text-align: left;
  }

  .brief-step-actions {
    align-items: stretch;
    border-radius: var(--radius);
    bottom: 10px;
    flex-wrap: wrap;
    padding: 12px;
  }

  .brief-step-btn,
  .brief-step-actions #submitBtn {
    flex: 1 1 auto;
    width: auto;
    padding-left: 16px;
    padding-right: 16px;
  }

  .brief-step-position {
    flex: 1 0 100%;
    order: -1;
  }

  .choice-tags {
    gap: 7px !important;
  }

  .choice-tags .choice-tag,
  .choice-tags > label {
    min-height: 32px;
    padding: 7px 10px;
  }
}
