/* Visual language matched to the S&Z brand pack (licence-direct-brand-pack,
2026-09-07), the same tokens used by snz.co.za, TM Direct and Patent Direct:
brand navy (#022f52) for headings/logo/footer, primary-button navy (#004370,
hover #005a9a) for in-app actions, amber (#f09e1b) for CTAs, and orange
(#b94803) for link/nav hover. See app/static/chrome.css for the shared site
chrome (nav, hero, footer) these tokens match. This file only changes the
LOOK of the wizard - class names/structure are unchanged, so no template
edits were needed alongside this. */

:root {
  color-scheme: light;
  --ink: #333333;
  --muted: #6b7280;
  --border: #c8d8e8;
  --navy: #004370;
  --navy-hover: #005a9a;
  --navy-dark: #022f52;
  --gold: #f09e1b;
  --orange-hover: #b94803;
  --error: #b3261e;
  --bg: #eaf1fa;
  --card-bg: #ffffff;
}

* { box-sizing: border-box; }

.admin-banner {
  background: var(--gold);
  color: #4a2f00;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.admin-banner a {
  color: #4a2f00;
  text-decoration: underline;
}

body {
  color: var(--ink);
  background: var(--bg);
}

main {
  max-width: 720px;
  margin: 2rem auto 4rem;
  padding: 2rem 2.25rem 2.5rem;
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(10, 45, 97, 0.08);
}

@media (max-width: 760px) {
  main {
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    padding: 1.5rem 1.25rem 3rem;
  }
}

.progress {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.step-nav-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 0.5rem;
}

.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.step-nav-item {
  color: var(--navy);
  text-decoration: none;
}

.step-nav-item:hover {
  text-decoration: underline;
}

.step-nav-item.current {
  color: var(--navy-dark);
  font-weight: 700;
  text-decoration: underline;
}

.step-nav-item.disabled {
  color: var(--muted);
  opacity: 0.55;
}

.step-nav-summary {
  color: var(--gold);
  padding-left: 0.85rem;
  border-left: 1px solid var(--border);
}

.step-nav-summary.current {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
}

.step-nav-start-again {
  color: var(--error);
  padding-left: 0.85rem;
  border-left: 1px solid var(--border);
}

.step-nav-start-again:hover {
  text-decoration: underline;
}

.step-nav-hint {
  font-style: italic;
  color: var(--muted);
  font-size: 0.82rem;
  margin: -0.75rem 0 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend, main h2 {
  font-family: "Lato", serif;
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--navy-dark);
  margin-bottom: 1.1rem;
  padding: 0 0 0.5rem;
  border-bottom: 2px solid var(--border);
  width: 100%;
}

main h2 {
  margin-top: 0;
}

.field {
  margin-bottom: 1.5rem;
}

.field > label {
  display: block;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.3rem;
}

.help-text {
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.15rem 0 0.4rem;
}

/* Collapsed by default (no `open` attribute) - optional, longer guidance
   on how to answer, kept out of the way of users who don't need it. */
.field-tip {
  margin: 0.15rem 0 0.5rem;
}

.field-tip summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}

.field-tip summary::-webkit-details-marker {
  display: none;
}

.field-tip p {
  margin: 0.4rem 0 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--gold);
  background: #fdf9f0;
  font-size: 0.9rem;
  color: var(--ink);
}

input[type="text"], input[type="date"], textarea, select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus, input[type="date"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 67, 112, 0.12);
}

select {
  max-width: 100%;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.radio-option, .tickbox-option {
  font-weight: normal;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

.radio-option:has(input:checked), .tickbox-option:has(input:checked) {
  border-color: var(--navy);
  background: rgba(0, 67, 112, 0.05);
}

.radio-option input, .tickbox-option input {
  flex-shrink: 0;
  margin-top: 0.2rem;
  accent-color: var(--navy);
}

.radio-option span, .tickbox-option span {
  flex: 1;
}

.tickbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notice {
  border-radius: 6px;
  padding: 0.8rem 1.1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.notice-warning {
  background: #fdf3e3;
  border: 1px solid var(--gold);
  color: #7a4a00;
}

.notice-info {
  background: #eaf1f7;
  border: 1px solid var(--navy);
  color: var(--navy-dark);
}

.repeatable-table, .summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5rem;
}

.repeatable-table th, .repeatable-table td,
.summary-table th, .summary-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  text-align: left;
}

.repeatable-table th, .summary-table th {
  background: #eef2f6;
  color: var(--navy-dark);
  font-size: 0.85rem;
}

.repeatable-table input[type="text"], .repeatable-table input[type="date"] {
  border: none;
  padding: 0.3rem;
}

.repeatable-table td:last-child {
  width: 2rem;
  text-align: center;
}

.cases-table td:last-child {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.case-label {
  font-weight: 700;
  color: var(--navy-dark);
}

.remove-row {
  border: none;
  background: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.3rem;
}

.add-row {
  background: none;
  border: 1px dashed var(--navy);
  color: var(--navy);
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.field-error input, .field-error textarea {
  border-color: var(--error);
}

.error-text {
  color: var(--error);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.step-error {
  background: #fdeceb;
  border: 1px solid var(--error);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.missing-items-banner {
  background: #fdeceb;
  border: 1px solid var(--error);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.missing-items-banner p {
  margin: 0 0 0.5rem;
}

.missing-group-title {
  font-weight: 600;
  margin-top: 0.75rem !important;
  display: flex;
  justify-content: space-between;
}

.missing-items-banner ul {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
}

.wizard-nav {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Keeps the three summary-page buttons (SAVE / DOWNLOAD WORD / DOWNLOAD PDF,
shown when an admin has opened a case) on one line instead of wrapping -
user-requested, 2026-09-07. Falls back to wrapping on narrow screens, where
one line no longer fits. */
.wizard-nav-compact {
  flex-wrap: nowrap;
}

.wizard-nav-compact .button {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .wizard-nav-compact {
    flex-wrap: wrap;
  }
}

button, a.button {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #fff;
  color: var(--navy-dark);
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

button:hover, a.button:hover {
  border-color: var(--navy);
}

button.primary, a.button.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

button.primary:hover, a.button.primary:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

button.secondary, a.button.secondary {
  background: #fff;
  color: var(--navy-dark);
  border-color: var(--navy-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.summary-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fff;
}

.summary-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-section-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

dl { margin: 0.75rem 0 0; }
dt { font-weight: 700; color: var(--navy-dark); margin-top: 0.5rem; }
dd { margin: 0.1rem 0 0; color: var(--ink); }

.case-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.case-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  background: #fff;
}

.case-info {
  display: flex;
  flex-direction: column;
}

.case-line {
  margin: 0;
  color: var(--ink);
}

.case-line strong {
  color: var(--navy-dark);
}

.case-meta {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.faq-section h2 {
  border: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.faq-item {
  margin-bottom: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 1rem;
}

.faq-item[open] {
  padding-bottom: 0.9rem;
}

.faq-question {
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 1.05rem;
  padding: 0.9rem 1.5rem 0.9rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-question:hover {
  color: var(--orange-hover);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0.9rem;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "\2212";
}

.faq-answer {
  color: var(--ink);
  margin: 0 0 0.6rem;
  line-height: 1.6;
}

.faq-answer:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--navy);
  font-weight: 700;
}

[hidden] { display: none !important; }
