/* CashbackCompare — Custom Styles */
/* Fonts loaded via index.html: Plus Jakarta Sans (headings), Inter (body) */

:root {
  --navy: #1e3a8a;
  --navy-dark: #172b68;
  --navy-light: #2d4fa8;
  --blue-accent: #3b82f6;
  --blue-light: #eff6ff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --green-best: #16a34a;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;

  /* Platform brand colors */
  --quidco: #00b4ff;
  --quidco-bg: #e0f7ff;
  --topcashback: #007c41;
  --topcashback-bg: #e6f7ee;
  --cheddar: #ff5c00;
  --cheddar-bg: #fff1eb;
  --jamdoughnut: #e11d9b;
  --jamdoughnut-bg: #fde8f5;
  --airtime: #6366f1;
  --airtime-bg: #eef2ff;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

/* ======================== NAV ======================== */
.site-nav {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.nav-logo svg {
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: white;
  letter-spacing: -0.3px;
}

.nav-logo-text span {
  color: #60a5fa;
}

.nav-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 400;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.last-updated-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

.last-updated-badge .dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ======================== HERO ======================== */
.hero-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  padding: 40px 20px 32px;
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.hero-section h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-section h1 span {
  color: #93c5fd;
}

.hero-section p {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

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

.hero-stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #60a5fa;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

/* ======================== MAIN ======================== */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ======================== CONTROLS ======================== */
.controls-bar {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.controls-row-1 {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.controls-row-2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

/* Category Tabs */
.tab-group {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.tab-btn {
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  background: white;
  color: var(--text-primary);
}

.tab-btn.active {
  background: white;
  color: var(--navy);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Cashback Type Tabs */
.type-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.type-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.type-tab:hover {
  border-color: var(--blue-accent);
  color: var(--blue-accent);
}

.type-tab.active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.type-tab .type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.type-tab[data-type="all"] .type-dot { background: var(--blue-accent); }
.type-tab[data-type="click_through"] .type-dot { background: var(--topcashback); }
.type-tab[data-type="gift_card"] .type-dot { background: var(--cheddar); }
.type-tab[data-type="automatic"] .type-dot { background: var(--airtime); }

.type-tab.active .type-dot { background: white; }

/* Tooltip for type tabs */
.type-tab-wrap {
  position: relative;
}

.type-tab-wrap .tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  width: 240px;
  text-align: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  line-height: 1.5;
  box-shadow: var(--shadow);
}

.type-tab-wrap .tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--text-primary);
  border-top: none;
}

.type-tab-wrap:hover .tooltip {
  opacity: 1;
}

/* Customer Toggle */
.customer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.customer-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.toggle-switch {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.toggle-opt {
  padding: 5px 14px;
  border: none;
  background: transparent;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-opt.active {
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Search */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: white;
  transition: border-color 0.15s ease;
  outline: none;
}

.search-input:focus {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-muted);
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.search-clear.visible {
  opacity: 1;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 50;
  overflow: hidden;
  display: none;
}

.autocomplete-dropdown.visible {
  display: block;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s ease;
  font-size: 14px;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: var(--blue-light);
}

.autocomplete-item img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
}

/* Results count */
.results-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ======================== TABLE WRAPPER ======================== */
.table-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ======================== COMPARISON TABLE ======================== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.comparison-table thead tr {
  background: var(--navy);
}

.comparison-table th {
  padding: 12px 16px;
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  user-select: none;
}

.comparison-table th.sortable {
  cursor: pointer;
  transition: background 0.15s ease;
}

.comparison-table th.sortable:hover {
  background: rgba(255,255,255,0.08);
}

.comparison-table th.sorted-asc,
.comparison-table th.sorted-desc {
  color: white;
}

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

th.sorted-asc .sort-indicator,
th.sorted-desc .sort-indicator {
  opacity: 1;
}

/* Sticky first column */
.col-retailer {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
  min-width: 200px;
  max-width: 220px;
}

thead .col-retailer {
  background: var(--navy);
  z-index: 3;
}

.col-platform {
  min-width: 120px;
  text-align: center !important;
}

.col-best {
  min-width: 110px;
  text-align: center !important;
}

/* Table rows */
.comparison-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.1s ease;
}

.comparison-table tbody tr:last-child {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: var(--blue-light);
}

.comparison-table tbody tr.expanded {
  background: var(--blue-light);
}

.comparison-table td {
  padding: 12px 16px;
  font-size: 14px;
  vertical-align: middle;
}

.comparison-table tbody td.col-retailer {
  background: white;
}

.comparison-table tbody tr:hover td.col-retailer,
.comparison-table tbody tr.expanded td.col-retailer {
  background: var(--blue-light);
}

/* Retailer name cell */
.retailer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.retailer-favicon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  padding: 2px;
}

.retailer-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.retailer-category-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}

/* Rate cells */
.rate-cell {
  text-align: center;
}

.rate-value {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.rate-value.na {
  color: var(--text-muted);
  font-weight: 400;
}

.rate-value.best {
  color: var(--green-best);
  font-weight: 700;
}

.rate-cell.is-best {
  background: var(--green-bg);
  box-shadow: inset 0 0 0 1px var(--green-border);
}

/* Best button */
.best-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  border: none;
  cursor: default;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.best-btn.quidco { background: var(--quidco); color: #003366; }
.best-btn.topcashback { background: var(--topcashback); }
.best-btn.cheddar { background: var(--cheddar); }
.best-btn.jamdoughnut { background: var(--jamdoughnut); }
.best-btn.airtime { background: var(--airtime); }
.best-btn.tie { background: var(--text-secondary); font-size: 11px; }
.best-btn.na { background: var(--border); color: var(--text-muted); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
  margin-left: 4px;
}

.badge-premium {
  background: rgba(0,180,255,0.12);
  color: #0084b3;
  border: 1px solid rgba(0,180,255,0.3);
}

.badge-giftcard {
  background: rgba(255,92,0,0.1);
  color: #cc4900;
  border: 1px solid rgba(255,92,0,0.25);
}

.badge-auto {
  background: rgba(99,102,241,0.1);
  color: #4f46e5;
  border: 1px solid rgba(99,102,241,0.25);
}

/* Column header platform badges */
.th-platform-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.th-platform-name {
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.th-platform-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.th-badge-premium { background: rgba(0,180,255,0.25); color: #7dd3fc; }
.th-badge-giftcard { background: rgba(255,92,0,0.25); color: #fdba74; }
.th-badge-auto { background: rgba(99,102,241,0.25); color: #c7d2fe; }

/* Expand indicator */
.expand-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 6px;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.15s ease;
}

tr.expanded .expand-icon {
  transform: rotate(180deg);
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

/* Expanded row */
.expanded-row td {
  padding: 0;
  background: #f8faff;
}

.expanded-content {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--blue-light);
}

.expanded-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.platform-detail-card {
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  background: white;
}

.platform-detail-card.unavailable {
  opacity: 0.55;
  background: var(--surface-2);
}

.platform-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.platform-detail-name {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.platform-detail-rate {
  font-size: 20px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.platform-detail-categories {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.cat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
}

.cat-row:last-child {
  border-bottom: none;
}

.cat-name {
  color: var(--text-secondary);
  flex: 1;
}

.cat-rate {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.platform-detail-terms {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.no-results h3 {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ======================== PLATFORM CARDS ======================== */
.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.platform-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.platform-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.platform-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.platform-card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

.platform-type-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.type-pill-click { background: var(--topcashback-bg); color: var(--topcashback); }
.type-pill-gift { background: var(--cheddar-bg); color: var(--cheddar); }
.type-pill-auto { background: var(--airtime-bg); color: var(--airtime); }

.platform-card-accent {
  height: 4px;
  border-radius: 2px;
  margin-bottom: 14px;
}

.platform-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.platform-card-note {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  border-left: 3px solid var(--border);
  margin-bottom: 14px;
  line-height: 1.5;
}

.platform-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--blue-accent);
  transition: color 0.15s ease;
}

.platform-card-link:hover {
  color: var(--navy);
}

/* ======================== MODAL ======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(3px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: white;
  border-radius: var(--radius);
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--navy);
  color: white;
}

.modal-retailer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-favicon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: white;
  padding: 4px;
  object-fit: contain;
}

.modal-retailer-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.modal-retailer-cat {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

.modal-close {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: background 0.15s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.2);
}

.modal-body {
  overflow-y: auto;
  padding: 24px;
  flex: 1;
}

.modal-platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.modal-platform-card {
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 2px solid var(--border);
  background: white;
  transition: border-color 0.15s ease;
}

.modal-platform-card.best-platform {
  border-color: var(--green-best);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

.modal-platform-card.unavailable {
  opacity: 0.5;
  background: var(--surface-2);
}

.modal-platform-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-platform-name {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-platform-rate {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.modal-platform-rate.na {
  color: var(--text-muted);
  font-size: 16px;
}

.best-badge-modal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green-best);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.modal-cats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.modal-terms {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-footer-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ======================== FOOTER ======================== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 40px 20px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

.footer-brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.footer-brand-name span {
  color: #60a5fa;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
  cursor: pointer;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: white;
}

.footer-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 12px;
  line-height: 1.6;
}

/* ======================== SKELETON LOADER ======================== */
.skeleton {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-row td {
  padding: 14px 16px;
}

.skeleton-rect {
  height: 14px;
  border-radius: 4px;
}

/* ======================== LOADING STATE ======================== */
#loading-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ======================== SCROLLBAR ======================== */
.table-scroll::-webkit-scrollbar,
.platform-detail-categories::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.modal-cats::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-scroll::-webkit-scrollbar-track,
.platform-detail-categories::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.modal-cats::-webkit-scrollbar-track {
  background: var(--surface-2);
}

.table-scroll::-webkit-scrollbar-thumb,
.platform-detail-categories::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.modal-cats::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-tagline { display: none; }
  .hero-section { padding: 28px 16px 24px; }
  .hero-section h1 { font-size: 22px; }
  .hero-section p { font-size: 14px; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 20px; }

  .main-container { padding: 16px 12px 40px; }
  .controls-bar { padding: 12px 14px; }

  .type-tab { padding: 6px 10px; font-size: 12px; }
  .type-tab-wrap .tooltip { left: 0; transform: none; width: 200px; }

  .controls-row-1 { gap: 8px; }
  .controls-row-2 { gap: 8px; }

  .customer-toggle { margin-left: 0; }
  .search-wrap { max-width: 100%; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-desc { max-width: 100%; }

  .modal-platforms-grid {
    grid-template-columns: 1fr;
  }

  .expanded-platforms {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .last-updated-badge { display: none; }
  .controls-row-2 { flex-direction: column; align-items: flex-start; }
  .search-wrap { max-width: 100%; width: 100%; }
}

/* ======================== MISC ======================== */
.section-spacing {
  margin-top: 40px;
}

.new-rate-note {
  font-size: 11px;
  color: #9333ea;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 4px;
}

.hidden-col {
  display: none !important;
}
