/* ============================================================
   SHARED CATEGORY PILLS — CocoPredict
   Desktop: white card with grouped sections (Free / VIP)
   Mobile:  horizontal wrap, all pills visible
   ============================================================ */

:root {
  --brand-primary: #8B5CF6;
  --brand-primary-soft: #F5F3FF;
  --brand-primary-hover: #7C3AED;
  --brand-dark: #0F172A;
  --ink-900: #0F172A;
  --ink-700: #334155;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-50: #F8FAFC;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   MOBILE FIRST — horizontal pills with white card background
   ============================================================ */
.category-pills-wrap {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: white;                     /* ← white card */
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  padding: 12px 12px;
  margin: 12px auto 16px;
  width: calc(100% - 24px);
  max-width: 1160px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.pills-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pills-section + .pills-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ink-100);
}

.pills-group-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: 0 4px;
}

.category-pills-scroll {
  display: flex;
  flex-wrap: wrap;                       /* wrap onto multiple lines */
  gap: 6px;
  justify-content: flex-start;
}

.pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--ink-50);             /* subtle pill bg on white card */
  border: 1.5px solid var(--ink-200);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-700);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.pill:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
}
.pill.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}
.pill.active .pill-icon {
  color: white;
}

.pill-icon {
  font-size: 11px;
  opacity: 0.85;
}
.pill.active .pill-icon {
  opacity: 1;
}

/* ============================================================
   DESKTOP (≥900px) — sidebar white card with grouped sections
   ============================================================ */
@media (min-width: 900px) {

  /* Main content becomes a two-column flex row */
  .main-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 24px !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 20px 24px !important;
  }

  /* Sidebar — sticky white card */
  .category-pills-wrap {
    flex: 0 0 200px;
    width: 200px;
    max-width: 200px;
    position: sticky !important;
    top: 84px !important;
    left: auto !important;
    right: auto !important;
    height: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;

    background: white;                   /* ← keep white */
    border: 1px solid var(--ink-200);
    border-radius: 16px;
    padding: 16px 12px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);

    margin: 0;
    z-index: 10;
  }

  /* Sidebar sections stack vertically */
  .pills-section {
    flex-direction: column;
    gap: 8px;
  }
  .pills-section + .pills-section {
    margin-top: 16px;
    padding-top: 16px;
  }

  /* Vertical stacking inside each section */
  .category-pills-scroll {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 0;
  }

  /* Full-width pills in the sidebar */
  .pill {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 10px;
  }

  /* Content column takes remaining width */
  .category-pills-wrap ~ * {
    flex: 1 1 auto;
    min-width: 0;
  }
  .odds-page,
  .seo-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* ============================================================
   TABLET (640px–899px)
   ============================================================ */
@media (min-width: 640px) and (max-width: 899px) {
  .category-pills-wrap {
    top: 60px;
  }
  .pill {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* ============================================================
   SMALL MOBILE (<400px)
   ============================================================ */
@media (max-width: 400px) {
  .category-pills-wrap {
    padding: 10px 10px;
    border-radius: 12px;
  }
  .category-pills-scroll {
    gap: 5px;
  }
  .pill {
    padding: 6px 10px;
    font-size: 11.5px;
    gap: 5px;
  }
  .pill-icon {
    font-size: 10px;
  }
  .pills-group-title {
    font-size: 10px;
  }
}

/* ============================================================
   SIDEBAR SCROLLBAR
   ============================================================ */
@media (min-width: 900px) {
  .category-pills-wrap::-webkit-scrollbar {
    width: 4px;
  }
  .category-pills-wrap::-webkit-scrollbar-track {
    background: transparent;
  }
  .category-pills-wrap::-webkit-scrollbar-thumb {
    background: var(--ink-200);
    border-radius: 4px;
  }
  .category-pills-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--ink-300);
  }
}