/* ================================================
   quote.css — All styles for the quote workflow
   Forked from ho6-condo.com, adapted for strassman.agency
   ================================================ */

/* ── Additional CSS Custom Properties ──────────── */
:root {
  /* Functional colors (not in strassman styles.css) */
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;

  /* Spacing tokens (not in strassman styles.css) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border radius tokens */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --shadow-teal: 0 2px 8px rgba(0, 74, 143, 0.1);
  --shadow-teal-glow: 0 0 0 1px rgba(120, 252, 254, 0.3), 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-teal-hover: 0 0 0 2px rgba(120, 252, 254, 0.4), 0 8px 20px rgba(0, 74, 143, 0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;

  /* Additional brand tokens */
  --brand-blue-dark: #003366;
  --brand-navy: #061226;
  --brand-text-light: #555555;
}


/* ── Quote Hero ────────────────────────────────── */
.quote-hero {
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--brand-blue) 35%, var(--brand-blue-dark) 100%);
  color: #ffffff;
  padding: var(--space-lg) 0 var(--space-2xl);
  text-align: center;
  position: relative;
}

.quote-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: linear-gradient(to bottom, transparent, var(--brand-bg));
}

.quote-hero h1 {
  margin-bottom: var(--space-sm);
}

.quote-hero p {
  opacity: 0.9;
  margin: 0;
}


/* ── LOB Picker ────────────────────────────────── */
.lob-picker {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
}

.lob-picker h2 {
  color: var(--brand-blue);
  margin-bottom: var(--space-sm);
  border: none;
  padding: 0;
}

.lob-picker > p {
  color: var(--brand-text-light);
  margin-bottom: var(--space-xl);
}

.lob-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.lob-card {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  text-decoration: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  transition: all 0.2s ease;
}

.lob-card:hover {
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-teal-hover);
  transform: translateY(-2px);
}

.lob-card:hover h3 {
  color: var(--brand-blue);
}

.lob-card.active {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: var(--shadow-teal-glow);
}

.lob-card.active h3 {
  color: #ffffff;
}

.lob-card.active .lob-icon {
  color: var(--accent-teal);
}

.lob-card.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.lob-icon {
  width: 48px;
  height: 48px;
  color: var(--brand-blue);
}

.lob-icon svg {
  width: 100%;
  height: 100%;
}

.lob-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--brand-text);
  transition: color 0.2s ease;
}

.lob-card .lob-soon {
  font-size: 0.75rem;
  color: var(--brand-text-light);
  margin: 0;
}

.lob-section-label {
  text-align: left;
  color: var(--brand-blue);
  font-size: 1rem;
  margin: var(--space-lg) 0 var(--space-xs);
  border: none;
  padding: 0;
}

.lob-section-label:first-of-type {
  margin-top: 0;
}

.lob-section-hint {
  text-align: left;
  color: var(--brand-text-light);
  font-size: 0.85rem;
  margin: 0 0 var(--space-md);
}

#lob-continue:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ── Quote Form Section ────────────────────────── */
.quote-form-section {
  padding: var(--space-2xl) 0;
}

.quote-form-section > .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.form-card {
  width: 100%;
  max-width: 800px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Override strassman's global h2 border-left inside form cards */
.form-card h2 {
  border-left: none;
  padding-left: 0;
}

@media (max-width: 600px) {
  .form-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }
}


/* ── Progress Bar ──────────────────────────────── */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid #e0e0e0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8eef4;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.progress-step.active .step-number {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(120, 252, 254, 0.3);
}

.progress-step.completed .step-number {
  background: var(--color-success);
  color: transparent;
  border-color: var(--color-success);
  position: relative;
}

.progress-step.completed .step-number::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.step-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.progress-step.active .step-label {
  color: var(--brand-blue);
  font-weight: 600;
}

.progress-step.completed .step-label {
  color: var(--color-success);
}

.progress-line {
  width: 32px;
  height: 3px;
  background: #e8eef4;
  margin: 0 var(--space-sm);
  margin-bottom: 20px;
  border-radius: 2px;
  transition: background var(--transition-base);
}

.progress-line.completed {
  background: var(--color-success);
}

@media (max-width: 500px) {
  .progress-line {
    width: 12px;
    margin: 0 4px;
    margin-bottom: 20px;
  }
  .step-number {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .step-label {
    font-size: 10px;
  }
}


/* ── Form Steps ────────────────────────────────── */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.form-step h2 {
  text-align: center;
  margin-bottom: var(--space-sm);
  color: var(--brand-blue);
}

.form-step h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  color: var(--brand-blue);
  font-size: 1.1rem;
}

.step-subtitle {
  text-align: center;
  color: var(--brand-text-light);
  margin-bottom: var(--space-xl);
}


/* ── Form Layout ───────────────────────────────── */
.form-row {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 500px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--brand-text);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-md);
  background: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 3px rgba(61, 170, 242, 0.15);
  outline: none;
}

.form-input::placeholder {
  color: #aaaaaa;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  color: var(--brand-text-light);
  font-size: 0.85rem;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #e0e0e0, transparent);
}


/* ── Step 3: Coverage Groups ───────────────────── */
.coverage-group {
  margin-bottom: var(--space-xl);
}

.label-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.label-row .form-label {
  margin-bottom: 0;
}


/* ── Step 4: Cards ─────────────────────────────── */
.step4-card {
  margin-bottom: var(--space-xl);
}

.step4-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
}

.step4-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.step4-card-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--brand-blue);
  opacity: 0.7;
}

.step4-card-icon svg {
  width: 100%;
  height: 100%;
}

.step4-card-body {
  padding: 0;
}

.step4-card-body .form-group:last-child {
  margin-bottom: 0;
}

.step4-inner-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e0e0e0, transparent);
  margin: var(--space-lg) 0;
}

.step4-card-body h4 {
  color: var(--brand-blue);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.safety-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ── Vehicle Cards ───────────────────────────────── */
.vehicle-card {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid #e0e0e0;
}
.vehicle-card:last-of-type { border-bottom: none; }
.vehicle-card.hidden { display: none; }

.vehicle-entry {
  position: relative;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px dashed #e0e0e0;
}
.vehicle-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.remove-vehicle-link {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.85rem;
  color: #c0392b;
  cursor: pointer;
}

.add-vehicle-btn {
  background: none;
  border: 1px dashed var(--brand-blue);
  color: var(--brand-blue);
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  width: 100%;
  transition: background 0.15s;
}
.add-vehicle-btn:hover {
  background: rgba(0, 100, 200, 0.05);
}


/* ── Form Actions ──────────────────────────────── */
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid #e0e0e0;
}

.form-actions .btn:only-child {
  margin-left: auto;
}

.form-actions .btn-primary {
  min-width: 140px;
}

.form-actions .btn-secondary {
  background: transparent;
  border: 2px solid var(--brand-blue-light);
  color: var(--brand-blue);
}

.form-actions .btn-secondary:hover {
  background: var(--brand-bg);
  border-color: var(--brand-blue);
}


/* ── Field Hints & Errors ──────────────────────── */
.field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-text-light);
  margin-top: 4px;
}

.field-error {
  display: block;
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 4px;
  font-weight: 500;
}

.field-error.hidden {
  display: none;
}

.form-input.error {
  border-color: var(--color-error);
  background: #fef2f2;
  animation: shake 0.3s ease;
}

.form-input.error:focus {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.nudge {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(61, 170, 242, 0.15);
}

.form-input.nudge:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(61, 170, 242, 0.25);
}

.form-input.success {
  border-color: var(--color-success);
}

.unit-select-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-blue-light);
  margin-top: 4px;
  font-weight: 500;
}

.unit-select-hint.hidden {
  display: none;
}


/* ── Address Autocomplete ──────────────────────── */
.address-input-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e0e5eb;
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 250px;
  overflow-y: auto;
}

.autocomplete-dropdown.hidden {
  display: none;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  color: #111111;
  background: #ffffff;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--brand-blue-light);
  color: #ffffff;
}


/* ── Radio Groups ──────────────────────────────── */
.radio-group {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  padding: 10px 16px;
  background: var(--brand-bg);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.radio-label:hover {
  background: #e8eef4;
}

.radio-label:has(input:checked) {
  border-color: var(--brand-blue);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--brand-blue);
}

.radio-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-blue);
}


/* ── Conditional Fields ────────────────────────── */
.conditional-field {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, #f8fafc 0%, var(--brand-bg) 100%);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand-blue-light);
  animation: slideDown 0.2s ease;
}

.conditional-field.hidden {
  display: none;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}


/* ── File Upload ───────────────────────────────── */
.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 20px;
  background: #ffffff;
  border: 2px dashed var(--brand-blue-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  color: var(--brand-blue);
  font-weight: 500;
}

.upload-btn:hover {
  border-color: var(--brand-blue);
  border-style: solid;
  background: var(--brand-bg);
  box-shadow: var(--shadow-sm);
}

.upload-btn input[type="file"] {
  display: none;
}

.file-name {
  display: block;
  font-size: 0.85rem;
  color: var(--color-success);
  margin-top: var(--space-sm);
  font-weight: 500;
}


/* ── Info Tooltips ─────────────────────────────── */
.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-blue-light);
  color: white;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
  flex-shrink: 0;
  transition: background var(--transition-fast);
  position: relative;
  border: none;
  padding: 0;
}

.info-tooltip:hover,
.info-tooltip:focus {
  background: var(--brand-blue);
  outline: none;
}

.info-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-blue);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: normal;
  white-space: normal;
  width: 250px;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  margin-bottom: 8px;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.info-tooltip:hover::after,
.info-tooltip:focus::after {
  opacity: 1;
  visibility: visible;
}


/* ── Consent ───────────────────────────────────── */
.consent-group {
  margin-top: var(--space-lg);
}

.consent-group.error .checkbox-label {
  color: var(--color-error);
}

.consent-error {
  font-size: 0.85rem;
  color: var(--color-error);
  font-weight: 500;
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

.consent-error.hidden {
  display: none;
}

.checkbox-label {
  display: flex;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--brand-text-light);
}

.checkbox-label input {
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
}

.checkbox-label a {
  color: var(--brand-blue);
}


/* ── Mailing Address ───────────────────────────── */
.mailing-fields.hidden {
  display: none;
}

.mailing-fields {
  margin-top: var(--space-md);
}

.mailing-fields .form-row {
  grid-template-columns: 2fr 1fr 1fr;
}

.required-badge {
  font-size: 0.75rem;
  background: var(--color-error);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 500;
}

.required-badge.hidden {
  display: none;
}

.mailing-required-star {
  color: var(--color-error);
}

.mailing-required-star.hidden {
  display: none;
}

#mailingCheckboxGroup.hidden {
  display: none;
}


/* ── Button Loading State ──────────────────────── */
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-loading.hidden {
  display: none;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}


/* ── Sidebar ───────────────────────────────────── */
.form-sidebar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-lg);
  width: 100%;
  max-width: 800px;
}

.form-sidebar.hidden {
  display: none;
}

.sidebar-card {
  flex: 1;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: border-color var(--transition-base);
}

.sidebar-card:hover {
  border-color: rgba(0, 74, 143, 0.15);
}

.sidebar-card h3 {
  color: var(--brand-text-light);
  margin-bottom: var(--space-sm);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  padding: 0;
}

.quote-id {
  font-size: 1.25rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  background: rgba(0, 74, 143, 0.07);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  margin: 0;
  border: 1px solid rgba(0, 74, 143, 0.1);
  letter-spacing: 0.1em;
  color: var(--brand-blue-dark);
}

.quote-id-hint {
  font-size: 0.8rem;
  color: var(--brand-text-light);
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

.quote-id-card.hidden,
.property-card.hidden {
  display: none;
}

.property-address {
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.unit-display {
  font-size: 0.9rem;
  color: var(--brand-text-light);
  margin: 0;
}

.add-unit-link {
  font-size: 0.85rem;
  color: var(--brand-blue);
  cursor: pointer;
}

.add-unit-link:hover {
  text-decoration: underline;
}

.change-address-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--brand-blue);
  margin-top: var(--space-sm);
}

.change-address-link:hover {
  text-decoration: underline;
}

#unitDropdownWrapper {
  margin-top: var(--space-sm);
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

#unitDropdownWrapper.hidden {
  display: none;
}

.form-input-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
}


/* ── Custom Amount Fields ──────────────────────── */
.custom-amount-field {
  margin-top: var(--space-sm);
}

.custom-amount-field.hidden {
  display: none;
}


/* ── Reassurance Message ───────────────────────── */
.reassurance-message {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
  border-radius: var(--radius-md);
  color: #065f46;
}

.reassurance-message p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.reassurance-message.hidden {
  display: none;
}


/* ── Coverage Info Message (0% Cov C) ────────── */
.coverage-info-message {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid var(--brand-blue-light);
  border-radius: var(--radius-md);
  color: var(--brand-blue-dark);
}

.coverage-info-message p {
  margin: 0;
  font-size: 0.85rem;
}

.coverage-info-message.hidden {
  display: none;
}


/* ── Bundle Glow (Renters + Auto) ────────────── */
@keyframes bundlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 170, 242, 0.3); }
  50% { box-shadow: 0 0 12px 4px rgba(61, 170, 242, 0.5); }
}

.lob-card.bundle-glow {
  animation: bundlePulse 2s ease-in-out infinite;
  border-color: var(--brand-blue-light);
}

.lob-bundle-hint {
  font-size: 0.7rem;
  color: var(--brand-blue-light);
  font-weight: 600;
  margin: 0;
}

.lob-bundle-hint.hidden {
  display: none;
}


/* ── Form Error State ──────────────────────────── */
.form-error {
  background: #fef2f2;
  border: 1px solid var(--color-error);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-lg);
  color: var(--color-error);
}

.form-error.hidden {
  display: none;
}

.form-error a {
  color: var(--color-error);
  font-weight: 600;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-error);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}


/* ── OTP / Verification ────────────────────────── */
.verify-card {
  max-width: 440px;
  margin: var(--space-2xl) auto;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.verify-card h2 {
  color: var(--brand-blue);
  margin-bottom: var(--space-sm);
  border: none;
  padding: 0;
}

.verify-card p {
  color: var(--brand-text-light);
  margin-bottom: var(--space-lg);
}

.otp-input {
  width: 100%;
  max-width: 200px;
  margin: 0 auto var(--space-lg);
  padding: 16px;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  text-align: center;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-md);
  background: #ffffff;
  transition: border-color var(--transition-fast);
}

.otp-input:focus {
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 3px rgba(61, 170, 242, 0.15);
  outline: none;
}

.verify-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.verify-link {
  font-size: 0.85rem;
  color: var(--brand-blue);
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

.verify-link:hover {
  text-decoration: underline;
}

.verify-success {
  color: var(--color-success);
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.verify-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: var(--space-sm);
}

.verify-error.hidden {
  display: none;
}

.masked-email {
  font-weight: 600;
  color: var(--brand-text);
}


/* ── Quotes Display ────────────────────────────── */
.quotes-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
}

@media (max-width: 900px) {
  .quotes-container {
    grid-template-columns: 1fr;
  }
}

.quotes-main {
  min-width: 0;
}

.quotes-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.lob-section {
  margin-bottom: var(--space-xl);
}

.lob-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--brand-blue);
}

.lob-section-header h2 {
  color: var(--brand-blue);
  margin: 0;
  font-size: 1.35rem;
  border: none;
  padding: 0;
}

.lob-section-header .lob-badge {
  font-size: 0.75rem;
  background: var(--brand-blue);
  color: #ffffff;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

/* Quote Card */
.quote-card {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.quote-card:hover {
  border-color: var(--brand-blue-light);
  box-shadow: var(--shadow-md);
}

.quote-card.selected {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-teal-glow);
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
}

.quote-card.winner {
  border-color: var(--color-success);
}

.quote-card.winner::before {
  content: 'Best Rate';
  position: absolute;
  top: -1px;
  right: var(--space-md);
  background: var(--color-success);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quote-card.ineligible {
  opacity: 0.6;
  cursor: default;
}

.quote-card.pending {
  opacity: 0.7;
}

.quote-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.quote-carrier {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.carrier-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.carrier-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--brand-text);
}

.quote-premium {
  text-align: right;
}

.premium-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-blue);
}

.premium-term {
  font-size: 0.8rem;
  color: var(--brand-text-light);
}

.premium-monthly {
  font-size: 0.85rem;
  color: var(--brand-text-light);
}

.quote-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-sm) var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid #f0f0f0;
}

.quote-detail-item {
  font-size: 0.85rem;
}

.quote-detail-label {
  color: var(--brand-text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quote-detail-value {
  font-weight: 600;
  color: var(--brand-text);
}

.quote-options-toggle {
  font-size: 0.85rem;
  color: var(--brand-blue);
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: var(--space-sm) 0;
}

.quote-options-toggle:hover {
  text-decoration: underline;
}

.quote-sub-options {
  padding-left: var(--space-lg);
  border-left: 2px solid #e0e0e0;
  margin-top: var(--space-sm);
}

.quote-sub-options.hidden {
  display: none;
}


/* ── Selection Sidebar ─────────────────────────── */
.selection-card {
  background: #ffffff;
  border: 2px solid var(--brand-blue);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: sticky;
  top: 80px;
}

.selection-card h3 {
  color: var(--brand-blue);
  margin-bottom: var(--space-md);
  font-size: 1rem;
  border: none;
  padding: 0;
}

.selection-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.selection-item:last-child {
  border-bottom: none;
}

.selection-total {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  border-top: 2px solid var(--brand-blue);
  font-weight: 700;
  font-size: 1.1rem;
}


/* ── Status Page ───────────────────────────────── */
.status-container {
  max-width: 600px;
  margin: var(--space-2xl) auto;
  padding: 0 var(--space-lg);
}

.status-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.status-card h2 {
  color: var(--brand-blue);
  margin-bottom: var(--space-lg);
  border: none;
  padding: 0;
}

/* Progress Track */
.progress-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  margin: var(--space-xl) 0;
}

.progress-track-step {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  position: relative;
}

.progress-track-step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.progress-track-step:first-child::before {
  top: 50%;
}

.progress-track-step:last-child::before {
  bottom: 50%;
}

.track-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8eef4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  transition: all var(--transition-base);
}

.progress-track-step.active .track-dot {
  background: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(0, 74, 143, 0.15);
}

.progress-track-step.completed .track-dot {
  background: var(--color-success);
}

.progress-track-step.completed::before {
  background: var(--color-success);
}

.track-dot svg {
  width: 16px;
  height: 16px;
  color: #ffffff;
}

.track-content {
  padding-top: 4px;
}

.track-title {
  font-weight: 600;
  color: var(--brand-text);
  font-size: 0.95rem;
}

.track-desc {
  font-size: 0.8rem;
  color: var(--brand-text-light);
  margin-top: 2px;
}

.progress-track-step.active .track-title {
  color: var(--brand-blue);
}

/* Clock Animation */
.status-clock {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  position: relative;
}

.status-clock svg {
  width: 100%;
  height: 100%;
  color: var(--brand-blue);
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f1fb 100%);
  border: 1px solid var(--brand-blue-light);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-blue);
  margin-top: var(--space-md);
}


/* ── Login Page ────────────────────────────────── */
.login-container {
  max-width: 440px;
  margin: var(--space-2xl) auto;
  padding: 0 var(--space-lg);
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.login-card h2 {
  color: var(--brand-blue);
  margin-bottom: var(--space-sm);
  border: none;
  padding: 0;
}

.login-card p {
  color: var(--brand-text-light);
  margin-bottom: var(--space-lg);
}

.login-input {
  width: 100%;
  padding: 16px;
  font-family: inherit;
  font-size: 1.1rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-md);
  background: #ffffff;
  text-align: center;
  transition: border-color var(--transition-fast);
  margin-bottom: var(--space-lg);
}

.login-input:focus {
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 3px rgba(61, 170, 242, 0.15);
  outline: none;
}

.login-not-found {
  background: #fefce8;
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  color: #854d0e;
  font-size: 0.9rem;
}


/* ── Shared Utility Classes ────────────────────── */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.btn-text.hidden {
  display: none;
}


/* ── Animations ────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes checkmark {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.verify-success-check {
  animation: checkmark 0.5s ease;
}


/* ── Mobile Touch Targets ──────────────────────── */
@media (max-width: 600px) {
  .form-input {
    padding: 16px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .radio-group {
    flex-direction: column;
    gap: var(--space-md);
  }

  .radio-label {
    padding: 12px 16px;
  }

  .checkbox-label {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .checkbox-label input {
    width: 20px;
    height: 20px;
  }

  .quotes-container {
    padding: var(--space-lg) var(--space-md);
  }

  .quote-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .quote-premium {
    text-align: left;
  }

  .lob-card {
    padding: var(--space-lg) var(--space-md);
  }
}
