:root {
  --brand: #241323;
  --accent: #EEA446;
  --accent-dark: #ddb363;
  --text: #241323;
  --muted: #7a7a7a;
  --border: #d6ccca;
  --error: #b3261e;
  --success: #1e7b34;
  --warning-bg: #fff6e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', 'Aptos', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: #f7f8fa;
  line-height: 1.5;
}

.page-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  border-bottom: 3px solid var(--accent);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.site-logo {
  display: inline-block;
  line-height: 1.15;
}

.site-logo .logo-main {
  display: block;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--brand);
  letter-spacing: 0.01em;
}

.site-logo .logo-ampersand {
  color: var(--accent);
}

.site-logo .logo-strapline {
  display: block;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.site-footer {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
}

/* Small print: present and legible, but never competing with the form itself. */
.site-footer .fca-preamble {
  font-size: 0.72rem;
  line-height: 1.45;
  margin: 0.5rem 0 0;
}

.site-footer .fca-preamble a {
  color: inherit;
  overflow-wrap: anywhere;
}

.form-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}


/* Used for headings that mirror the logo style: black text, gold ampersand */
.heading-brand {
  color: #000000;
  font-weight: 300;
  margin-top: 0;
}

.heading-brand .logo-ampersand {
  color: var(--accent);
}

.lead {
  color: var(--brand);
  font-size: 1.4rem;
  font-weight: 300;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row .form-field {
  flex: 1 1 240px;
}

.form-field {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

/* A conditional follow-up to the question above it: indented and rule-attached so it reads as
   part of that question rather than as the next unrelated one. */
.form-field-sub {
  margin-left: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.form-field label,
.form-field-label {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.required-marker {
  color: var(--error, #c00);
  margin-left: 0.2em;
}

.field-hint,
.upload-help {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.1rem 0 0.35rem;
}

input:not([type]),
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  max-width: 100%;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}

legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.35rem;
}

.radio-group label {
  margin-right: 1.25rem;
  font-weight: 400;
}

.checkbox-field label {
  font-weight: 400;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pill:hover {
  border-color: var(--accent-dark);
}

.pill-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill:has(.pill-checkbox:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pill-selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.declaration-text {
  background: #f9f7f6;
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.declaration-text p:first-child {
  margin-top: 0;
}

.declaration-text ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.declaration-text li {
  margin-bottom: 0.35rem;
}

.question-lead-heading {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.form-field > .question-lead-heading:first-child {
  margin-top: 0;
}

.external-link-prompt {
  font-size: 0.92rem;
  margin: 0.5rem 0 0.75rem;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 19, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-content {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

.form-actions .button-primary:only-child {
  margin-left: auto;
}

.button {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.6rem 2.2rem;
  border: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button-primary {
  background: var(--brand);
  color: #ffffff;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.button-primary:hover:not(:disabled) {
  background: #EEA446;
}

.button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* The choice buttons (claim type picker, and the cover picker offered when the policy
   lookup finds nothing). Outlined so they never compete with a primary action, and
   filled on hover: in a row of options the pointer is the only thing telling the user
   which one they are about to pick. */
.button-secondary {
  background: #ffffff;
  color: var(--brand);
  border: 2px solid var(--border);
  font-weight: 600;
}

.button-secondary:hover:not(:disabled) {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* Set only by the cover picker, where the button is a choice the claimant keeps until they
   press Next - it has to stay visibly picked once the pointer moves away. */
.button-secondary[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.button-secondary[aria-pressed="true"]:hover:not(:disabled) {
  border-color: var(--accent);
}

.button-secondary:active:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--brand);
}

.button-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Submit feedback: claim submission calls Proclaim inline, so the wait is measured in
   seconds, not milliseconds. */
.spinner {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.5rem;
  vertical-align: -0.1em;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
}

.submitting-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

.button-link {
  background: none;
  color: var(--brand);
  text-decoration: underline;
  padding: 0.25rem 0.5rem;
}

.validation-message {
  color: var(--error);
  font-size: 0.85rem;
  margin: 0.2rem 0 0;
}

.alert {
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}

.alert-error {
  background: #fdecea;
  border: 1px solid var(--error);
  color: var(--error);
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid #d9a521;
}

.policy-stamp {
  margin: 0 0 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.policy-stamp strong {
  color: var(--text);
  font-weight: 600;
}

/* Shared by ClaimTypeSelectionStep and the cover picker on the details step */
.claim-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Equal widths rather than ragged, text-length-driven ones, wrapping to one per row
   once there is no longer space for two. */
.claim-type-option {
  flex: 1 1 12rem;
}

.cover-choice {
  margin-bottom: 1rem;
}

/* Numbered circles joined by connector lines. Deliberately no accent-coloured
   horizontal rule: the header already ends in one (.site-header border-bottom), and a
   second orange bar directly beneath it read as two competing lines. */
.progress-indicator ol {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.progress-indicator li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Every item but the last grows, so its ::after connector fills the gap to the next circle */
.progress-indicator li:not(:last-child) {
  flex: 1 1 auto;
}

.progress-indicator li:not(:last-child)::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
  margin: 0 0.75rem;
}

.progress-indicator .step-number {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.progress-indicator li.step-current .step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.progress-indicator li.step-current .step-label {
  color: var(--text);
  font-weight: 600;
}

.progress-indicator li.step-complete .step-number {
  border-color: var(--accent);
  color: var(--accent);
}

/* Three labels plus connectors don't fit on a phone - keep the numbers and show only
   the current step's label. */
@media (max-width: 30rem) {
  .progress-indicator li:not(:last-child)::after {
    display: none;
  }

  .progress-indicator li:not(:last-child) {
    flex: 0 0 auto;
    margin-right: 0.75rem;
  }

  .progress-indicator li:not(.step-current) .step-label {
    display: none;
  }
}

.upload-section {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.upload-label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.upload-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.upload-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

/* Honeypot: visually removed, still in the DOM for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Circuit failure / reconnect UI. Blazor unhides #blazor-error-ui and stamps the
   components-reconnect-* classes on the modal itself; both are hidden until it does. */
#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.9rem 2.5rem 0.9rem 1.1rem;
  background: #fdecea;
  border-top: 1px solid var(--error);
  color: var(--error);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

#blazor-error-ui .reload {
  color: var(--error);
  margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 1.1rem;
  top: 0.75rem;
  font-size: 1.1rem;
}

#components-reconnect-modal {
  display: none;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1001;
  align-items: center;
  justify-content: center;
  background: rgba(36, 19, 35, 0.55);
}

#components-reconnect-modal .reconnect-panel {
  background: #fff;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  max-width: 22rem;
  text-align: center;
}

#components-reconnect-modal .reconnect-panel p {
  display: none;
  margin: 0;
}

#components-reconnect-modal .reconnect-panel a {
  margin-left: 0.4rem;
}

#components-reconnect-modal.components-reconnect-show .reconnect-show,
#components-reconnect-modal.components-reconnect-retrying .reconnect-show,
#components-reconnect-modal.components-reconnect-failed .reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected .reconnect-rejected {
  display: block;
}
