/* === COMPARE PAGE — consumer-facing rate comparison === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #0B1628;
  --navy-light: #132035;
  --navy-mid: #1A2D4A;
  --gold: #C9A84C;
  --gold-light: #D4B96A;
  --gold-dim: rgba(201, 168, 76, 0.12);
  --gold-border: rgba(201, 168, 76, 0.35);
  --cream: #F4F1EC;
  --text-secondary: #8FA3BF;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === NAV === */
.cmp-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,22,40,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.12);
}
.cmp-nav-inner {
  max-width: 860px; margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; gap: 12px;
}
.cmp-nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.cmp-nav-logo span {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px;
  color: var(--cream); letter-spacing: -0.5px;
}
.cmp-nav-tag {
  font-size: 12px; font-weight: 500;
  background: var(--gold-dim); color: var(--gold);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 3px 10px; border-radius: 20px;
}
.cmp-nav-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: #4ade80;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 6px #4ade80; flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* === LAYOUT === */
.cmp-main {
  max-width: 860px; margin: 0 auto;
  padding: 48px 24px 80px;
}
.cmp-hero { margin-bottom: 40px; }
.cmp-hero h1 {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 36px;
  color: var(--cream); line-height: 1.15; margin-bottom: 10px;
}
.cmp-hero h1 span { color: var(--gold); }
.cmp-hero p { color: var(--text-secondary); font-size: 16px; line-height: 1.6; }

/* === CONTROLS CARD === */
.cmp-controls {
  background: var(--navy-light);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 32px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end;
}
.ctrl-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 160px; }
.ctrl-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary);
}
.corridor-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.corridor-btn {
  background: var(--navy-mid); border: 1px solid rgba(201,168,76,0.12);
  border-radius: 10px; padding: 10px 16px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--cream); cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.corridor-btn:hover { border-color: rgba(201,168,76,0.3); }
.corridor-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}
.amount-row { display: flex; align-items: center; gap: 0; }
.amount-symbol {
  background: var(--navy-mid); border: 1px solid rgba(201,168,76,0.12);
  border-right: none; border-radius: 10px 0 0 10px;
  padding: 11px 14px; font-size: 16px; font-weight: 600; color: var(--gold);
  line-height: 1;
}
.amount-input {
  background: var(--navy-mid); border: 1px solid rgba(201,168,76,0.12);
  border-radius: 0 10px 10px 0; padding: 11px 16px;
  font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 600;
  color: var(--cream); outline: none; width: 140px;
  transition: border-color 0.15s;
}
.amount-input:focus { border-color: rgba(201,168,76,0.4); }
.amount-input::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.amount-input[type=number] { -moz-appearance: textfield; }

/* === PARALLEL MARKET BANNER === */
.parallel-banner {
  display: flex; align-items: center; gap: 12px;
  background: rgba(201,168,76,0.05);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 10px; padding: 12px 20px;
  margin-bottom: 20px;
}
.parallel-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-secondary); flex-shrink: 0;
}
.parallel-rate {
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700;
  color: var(--gold);
}
.parallel-note { font-size: 12px; color: var(--text-secondary); margin-left: auto; }

/* === BROKER TABLE === */
.broker-table-wrap { overflow-x: auto; }
.broker-table {
  width: 100%; border-collapse: collapse;
}
.broker-table thead th {
  text-align: left; padding: 0 16px 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.broker-table thead th:last-child { text-align: right; }
.broker-table thead th.num { text-align: right; }

.broker-row {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.broker-row:hover { background: rgba(255,255,255,0.02); }
.broker-row td { padding: 18px 16px; vertical-align: middle; }

/* Best row: gold left border + gold tint */
.broker-row.best-row {
  border-left: 3px solid var(--gold);
  background: var(--gold-dim);
}
.broker-row.best-row:hover { background: rgba(201,168,76,0.16); }

.broker-name-cell {}
.broker-name {
  font-size: 15px; font-weight: 600; color: var(--cream); margin-bottom: 3px;
  display: flex; align-items: center; gap: 8px;
}
.broker-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  background: var(--gold); color: var(--navy);
  padding: 2px 8px; border-radius: 4px; flex-shrink: 0;
}
.broker-rating { font-size: 12px; color: var(--gold); }
.broker-rating span { color: var(--text-secondary); }
.broker-name-link {
  color: var(--cream); text-decoration: none;
  transition: color 0.15s;
}
.broker-name-link:hover { color: var(--gold); }
.view-profile-link {
  font-size: 11px; color: var(--text-secondary);
  text-decoration: none; transition: color 0.15s;
}
.view-profile-link:hover { color: var(--gold); }

.num-cell {
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--cream); text-align: right; white-space: nowrap;
}
.total-cell {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px;
  color: var(--cream); text-align: right; white-space: nowrap;
}
.best-row .total-cell { color: var(--gold); }

.cta-cell { text-align: right; }
.cta-btn {
  display: inline-block;
  background: var(--gold); color: var(--navy);
  border: none; border-radius: 8px;
  padding: 9px 20px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.cta-btn:hover { background: var(--gold-light); transform: translateY(-1px); }
.broker-row:not(.best-row) .cta-btn {
  background: transparent;
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
}
.broker-row:not(.best-row) .cta-btn:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}

/* === EMPTY STATE === */
.cmp-empty {
  text-align: center; padding: 60px 24px;
  color: var(--text-secondary);
}
.cmp-empty p { font-size: 15px; }

/* === LOADING === */
.cmp-loading {
  text-align: center; padding: 60px 24px;
  color: var(--text-secondary); font-size: 15px;
}

/* === FOOTER NOTE === */
.cmp-footer-note {
  margin-top: 40px; text-align: center;
  font-size: 12px; color: var(--text-secondary); line-height: 1.6;
}
.cmp-footer-note a { color: var(--gold); text-decoration: none; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .cmp-main { padding: 32px 16px 60px; }
  .cmp-hero h1 { font-size: 26px; }
  .cmp-controls { padding: 20px; gap: 16px; }
  .broker-table thead th:nth-child(3),
  .broker-table td:nth-child(3) { display: none; } /* hide Fee col on mobile */
  .cmp-nav-tag { display: none; }
}
@media (max-width: 420px) {
  .corridor-btn { padding: 8px 12px; font-size: 13px; }
  .num-cell, .total-cell { font-size: 14px; }
}

/* === QUOTE MODAL === */
.quote-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(11,22,40,0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.quote-modal {
  position: relative;
  background: var(--navy-light);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 36px 40px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none;
  font-size: 18px; color: var(--text-secondary);
  cursor: pointer; padding: 4px 8px; line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--cream); }
.modal-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
  margin: 0 0 8px;
}
.modal-title {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 22px;
  color: var(--cream); margin: 0 0 24px; line-height: 1.2;
}

/* Summary card */
.modal-summary {
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.modal-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  font-size: 14px; color: var(--text-secondary);
}
.modal-summary-row strong { color: var(--cream); font-weight: 600; }
.modal-summary-total {
  border-top: 1px solid var(--gold-border);
  margin-top: 8px; padding-top: 14px;
  font-size: 15px; font-weight: 700; color: var(--cream);
}
.modal-summary-total strong {
  font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: var(--gold);
}

/* Form */
.modal-field { margin-bottom: 18px; }
.modal-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--cream); margin-bottom: 8px;
}
.modal-field .req { color: var(--gold); }
.modal-field .opt { font-weight: 400; font-size: 12px; color: var(--text-secondary); }
.modal-field input {
  width: 100%;
  background: var(--navy-mid);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif; font-size: 15px;
  color: var(--cream); outline: none;
  transition: border-color 0.15s;
}
.modal-field input:focus { border-color: var(--gold-border); }
.modal-field input::placeholder { color: var(--text-secondary); }
.field-error {
  display: block; margin-top: 6px;
  font-size: 12px; color: #f87171; min-height: 16px;
}
.modal-submit {
  width: 100%; margin-top: 4px;
  background: var(--gold); color: var(--navy);
  border: none; border-radius: 10px;
  padding: 14px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.modal-submit:hover:not(:disabled) { background: var(--gold-light); }
.modal-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.modal-disclaimer {
  margin-top: 12px; text-align: center;
  font-size: 12px; color: var(--text-secondary); line-height: 1.6;
}

/* Success state */
.modal-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(74,222,128,0.15); border: 2px solid #4ade80;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #4ade80; font-weight: 700;
  margin: 0 auto 20px;
}
.modal-success-msg {
  color: var(--text-secondary); font-size: 15px; line-height: 1.6;
  margin: 0 0 28px; text-align: center;
}

/* Mobile */
@media (max-width: 520px) {
  .quote-modal { padding: 28px 20px; }
  .modal-title { font-size: 19px; }
  .modal-summary { padding: 16px 18px; }
}
