/* ============================================================
   U.S. Online Degree Directory — v2.0
   Mobile-first, sidebar filter layout
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --c-primary:      #1d4ed8;
  --c-primary-lt:   #3b82f6;
  --c-primary-xlt:  #eff6ff;
  --c-accent:       #0891b2;   /* teal — compare/action */
  --c-green:        #059669;
  --c-amber:        #d97706;
  --c-red:          #dc2626;
  --c-bg:           #f1f5f9;
  --c-card:         #ffffff;
  --c-border:       #e2e8f0;
  --c-text:         #0f172a;
  --c-muted:        #64748b;
  --c-muted-lt:     #94a3b8;
  --radius-sm:      6px;
  --radius:         12px;
  --radius-lg:      16px;
  --shadow:         0 1px 4px rgba(0,0,0,.07), 0 2px 12px rgba(0,0,0,.05);
  --shadow-hover:   0 4px 20px rgba(0,0,0,.13);
  --sidebar-w:      268px;
  --transition:     .2s cubic-bezier(.4,0,.2,1);
}

/* ── Base ────────────────────────────────────────────────────── */
.odd-app *,
.odd-app *::before,
.odd-app *::after { box-sizing: border-box; }

.odd-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 70vh;
  position: relative;
}

/* ── Top Bar ─────────────────────────────────────────────────── */
.odd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.odd-topbar-count { font-size: 14px; color: var(--c-muted); }
.odd-topbar-count strong { font-size: 20px; font-weight: 800; color: var(--c-primary); margin-right: 4px; }

.odd-topbar-actions { display: flex; align-items: center; gap: 10px; }

.odd-sort-select {
  padding: 7px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--c-text);
  background: #f8fafc;
  cursor: pointer;
}

.odd-filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--c-primary);
  border-radius: var(--radius-sm);
  background: var(--c-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.odd-filter-toggle:hover { background: #1e40af; }

.odd-active-count {
  background: var(--c-accent);
  color: #fff;
  border-radius: 50px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Layout ──────────────────────────────────────────────────── */
.odd-layout {
  display: flex;
  align-items: flex-start;
  min-height: 60vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.odd-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--c-border);
  min-height: 100%;
  position: sticky;
  top: 53px;          /* height of topbar */
  height: calc(100vh - 53px);
  overflow-y: auto;
  z-index: 90;
  transition: transform var(--transition);
}

.odd-sidebar-inner { padding: 20px 18px; }

.odd-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.odd-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--c-text);
}

.odd-clear-all {
  font-size: 12px;
  color: var(--c-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.odd-clear-all:hover { color: var(--c-red); }

/* Filter group */
.odd-filter-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border);
}
.odd-filter-group:last-of-type { border-bottom: none; }

.odd-filter-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 10px;
}

/* Search inside sidebar */
.odd-search-wrap { position: relative; }
.odd-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--c-muted-lt);
  pointer-events: none;
}
.odd-search-wrap input {
  width: 100%;
  padding: 9px 12px 9px 32px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #f8fafc;
  transition: border-color var(--transition);
}
.odd-search-wrap input:focus {
  outline: none;
  border-color: var(--c-primary-lt);
  background: #fff;
}

/* Checkbox list */
.odd-checkbox-list { display: flex; flex-direction: column; gap: 8px; }
.odd-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--c-text);
}
.odd-checkbox-label input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--c-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.odd-term-count { color: var(--c-muted-lt); font-size: 11px; }

/* Select */
.odd-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #f8fafc;
  color: var(--c-text);
  cursor: pointer;
}
.odd-select:focus { outline: none; border-color: var(--c-primary-lt); }

/* Close sidebar button (mobile only) */
.odd-close-sidebar {
  display: none;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #f1f5f9;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.odd-main {
  flex: 1;
  min-width: 0;
  padding: 20px;
}

/* ── Card Grid ────────────────────────────────────────────── */
.odd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ── Program Card ─────────────────────────────────────────── */
.odd-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.odd-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.odd-card.is-comparing {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 2px var(--c-accent);
}
.odd-card.is-bookmarked .odd-bookmark svg { fill: var(--c-primary); }

/* Card header — school + bookmark */
.odd-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.odd-school-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .4px;
  line-height: 1.3;
}
.odd-bookmark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}
.odd-bookmark svg { width: 14px; height: 14px; color: var(--c-muted); }
.odd-bookmark:hover { border-color: var(--c-primary); background: var(--c-primary-xlt); }

/* Title */
.odd-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.odd-card-title a { color: var(--c-text); text-decoration: none; }
.odd-card-title a:hover { color: var(--c-primary); }

/* Badges */
.odd-card-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.odd-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.odd-badge-level  { background: #ede9fe; color: #6d28d9; }
.odd-badge-format { background: #ecfdf5; color: #065f46; }
.odd-badge-deg    { background: var(--c-primary-xlt); color: var(--c-primary); }
.odd-badge-accred { background: #fef9c3; color: #854d0e; }
.odd-badge-accred-regional     { background: #dcfce7; color: #166534; }
.odd-badge-accred-national     { background: #fef9c3; color: #854d0e; }
.odd-badge-accred-programmatic { background: #e0f2fe; color: #0c4a6e; }

/* Why demand */
.odd-card-why {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stats mini-grid */
.odd-card-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 12px 10px;
}
.odd-stat { text-align: center; }
.odd-stat-val {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
  word-break: break-word;
}
.odd-stat-lbl {
  display: block;
  font-size: 10px;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 2px;
}
.odd-stat-green { color: var(--c-green); }

/* Quick info */
.odd-card-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--c-muted);
}

/* Footer */
.odd-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
  gap: 8px;
  margin-top: auto;
}

.odd-compare-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--c-muted);
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  transition: all var(--transition);
}
.odd-compare-toggle svg { width: 13px; height: 13px; }
.odd-compare-toggle:hover,
.odd-card.is-comparing .odd-compare-toggle {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: #ecfeff;
}

.odd-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--c-primary);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}
.odd-visit-btn svg { width: 13px; height: 13px; }
.odd-visit-btn:hover { background: #1e40af; }
.odd-visit-btn--internal { background: var(--c-accent); }
.odd-visit-btn--internal:hover { background: #0e7490; }

/* No results */
.odd-no-results {
  text-align: center;
  padding: 64px 20px;
  color: var(--c-muted);
  grid-column: 1 / -1;
}
.odd-no-results svg { width: 64px; height: 64px; margin-bottom: 16px; }
.odd-no-results h3 { font-size: 18px; margin: 0 0 8px; color: var(--c-text); }
.odd-no-results p { margin: 0 0 20px; }
.odd-reset-btn {
  padding: 10px 22px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ── COMPARE BAR (sticky bottom) ─────────────────────────── */
.odd-compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--c-text);
  color: #fff;
  z-index: 300;
  border-top: 3px solid var(--c-accent);
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
.odd-compare-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.odd-compare-slots {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}
.odd-compare-slot {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 180px;
}
.odd-compare-slot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.odd-compare-slot-remove {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.odd-compare-slot-remove:hover { color: #fff; }
.odd-compare-bar-actions { display: flex; align-items: center; gap: 12px; }
.odd-compare-hint { font-size: 12px; color: #94a3b8; }
.odd-compare-now-btn {
  padding: 9px 20px;
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.odd-compare-now-btn:disabled { background: #475569; cursor: default; }
.odd-compare-now-btn:not(:disabled):hover { background: #0e7490; }

/* ── COMPARE MODAL ───────────────────────────────────────── */
.odd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 400;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.odd-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.odd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
}
.odd-modal-title { font-size: 20px; font-weight: 800; margin: 0; }
.odd-modal-close {
  width: 36px; height: 36px;
  background: #f1f5f9;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
}
.odd-modal-close:hover { background: #fee2e2; }
.odd-modal-body { padding: 24px; overflow-x: auto; }
.odd-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.odd-compare-table th,
.odd-compare-table td {
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  vertical-align: top;
  text-align: left;
}
.odd-compare-table th { background: #f8fafc; font-weight: 700; width: 140px; }
.odd-compare-table thead th { background: var(--c-primary); color: #fff; width: auto; text-align: center; }
.odd-compare-table tr:nth-child(even) td { background: #f8fafc; }
.odd-compare-link {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  background: var(--c-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

/* ── SIDEBAR OVERLAY (mobile) ────────────────────────────── */
.odd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 89;
}

/* ── BOOKMARK TRAY ───────────────────────────────────────── */
.odd-bookmark-tray {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  z-index: 200;
  overflow: hidden;
}
.odd-bookmark-tray-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-primary-xlt);
}
.odd-bookmark-tray-header strong { font-size: 14px; color: var(--c-primary); }
#odd-bookmark-tray-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--c-muted);
}
.odd-bookmark-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.odd-bookmark-list li {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}
.odd-bookmark-list li a { color: var(--c-primary); text-decoration: none; font-weight: 600; }
.odd-bookmark-list li span { display: block; font-size: 11px; color: var(--c-muted); }
.odd-bookmark-empty {
  text-align: center;
  color: var(--c-muted);
  padding: 20px;
  font-size: 13px;
}

/* ── LEAD FORM ────────────────────────────────────────────── */
.odd-lead-box {
  background: #fff;
  border: 2px solid var(--c-primary);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.odd-lead-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-primary);
  margin: 0 0 6px;
}
.odd-lead-sub {
  font-size: 13px;
  color: var(--c-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}
.odd-lead-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.odd-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.odd-lead-form input,
.odd-lead-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #f8fafc;
  color: var(--c-text);
  transition: border-color var(--transition);
}
.odd-lead-form input:focus,
.odd-lead-form select:focus {
  outline: none;
  border-color: var(--c-primary-lt);
  background: #fff;
}
.odd-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.odd-submit-btn:hover { background: #1e40af; }
.odd-submit-btn:disabled { background: var(--c-muted); cursor: wait; }
.odd-form-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--c-green);
  padding: 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}
.odd-form-disclaimer {
  font-size: 11px;
  color: #94a3b8;
  margin: 6px 0 0;
  line-height: 1.4;
}

/* ── SINGLE PAGE ─────────────────────────────────────────── */
.odd-single-wrap {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}
.odd-single-header { margin-bottom: 24px; }
.odd-single-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.odd-single-school {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--c-primary);
  margin-bottom: 8px;
}
.odd-single-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
}
.odd-single-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}
.odd-single-stat { text-align: center; }
.odd-single-stat-val { font-size: 20px; font-weight: 800; color: var(--c-primary); }
.odd-single-stat-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--c-muted); margin-top: 4px; }
.odd-single-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
.odd-single-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--c-border);
}
.odd-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}
.odd-detail-item {
  background: #f8fafc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.odd-detail-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--c-muted); font-weight: 700; }
.odd-detail-value { font-size: 14px; font-weight: 700; color: var(--c-text); margin-top: 4px; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .odd-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
  }
  .odd-sidebar.is-open {
    transform: translateX(0);
  }
  .odd-overlay.is-open { display: block; }
  .odd-close-sidebar   { display: block; }
  .odd-main { padding: 16px; }
  .odd-single-body { grid-template-columns: 1fr; }
  .odd-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .odd-grid { grid-template-columns: 1fr; }
  .odd-topbar { padding: 10px 14px; }
  .odd-single-title { font-size: 24px; }
  .odd-compare-bar-inner { flex-direction: column; }
  .odd-compare-slots { width: 100%; }
  .odd-bookmark-tray { width: calc(100vw - 32px); right: 16px; }
}
