/* Trend Sheets — Unified V2 Grouped by Matchup Design
   Works for both NFL and NBA trend sections
   Uses .trend-sheets-container class for sport-agnostic styling */

/* ==============================================
   CSS VARIABLES / DESIGN TOKENS
   (Matched to app theme from style.css)
   ============================================== */
.trend-sheets-container {
  /* Backgrounds - matched to app theme */
  --color-bg-primary: #0a1628;
  --color-bg-card: #0d1b2a;
  --color-bg-elevated: rgba(255, 255, 255, 0.03);
  --color-bg-hover: rgba(0, 211, 189, 0.08);

  /* Borders - matched to app theme */
  --color-border-subtle: rgba(0, 211, 189, 0.1);
  --color-border-default: #033B3F;
  --color-border-strong: rgba(0, 211, 189, 0.2);

  /* Text - matched to app ink colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #e8ffe9;
  --color-text-tertiary: #b4d7c4;
  --color-text-muted: #999;

  /* Accent - matched to brand-teal */
  --color-accent: #00D3BD;
  --color-accent-bright: #00F5D4;
  --color-accent-hover: #00AD84;
  --color-accent-subtle: rgba(0, 211, 189, 0.1);
  --color-accent-border: rgba(0, 211, 189, 0.25);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00F5D4 0%, #00D3BD 50%, #00AD84 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(0, 211, 189, 0.12) 0%, rgba(0, 173, 132, 0.04) 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);

  /* Success - matched to brand-green */
  --color-success: #09b05c;
  --color-success-subtle: rgba(9, 176, 92, 0.12);
  --color-success-border: rgba(9, 176, 92, 0.25);

  /* Fonts - matched to app */
  --font-family-sans: "Avenir", "Inter", system-ui, -apple-system, sans-serif;
  --font-family-mono: 'JetBrains Mono', monospace;

  --font-size-xs: 0.65rem;
  --font-size-sm: 0.8rem;
  --font-size-base: 0.9rem;
  --font-size-lg: 0.95rem;
  --font-size-xl: 1.4rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 24px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 999px;

  --transition-fast: 0.15s ease;

  /* Hidden by default */
  display: none;
}

/* Ensure parent containers allow full width centering */
#trends-section.trend-sheets-active,
#trends-content.trend-sheets-active {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

/* Show as flex when visible */
.trend-sheets-container.is-visible {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* ==============================================
   MAIN CONTAINER
   ============================================== */
.trend-sheets-container .trend-sheets {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: var(--gradient-card);
  background-color: var(--color-bg-card);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Gradient accent line at top */
.trend-sheets-container .trend-sheets::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 211, 189, 0.3) 50%, transparent 100%);
  z-index: 1;
}

/* ==============================================
   PAGE HEADER
   ============================================== */
.trend-sheets-container .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-xl) var(--spacing-2xl);
  border-bottom: 1px solid var(--color-border-subtle);
}

.trend-sheets-container .header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.trend-sheets-container .page-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

/* Window Toggle (L3, L4, L5, L10, Season) */
.trend-sheets-container .window-toggle {
  display: flex;
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.06) 0%, rgba(0, 211, 189, 0.02) 100%);
  border: 1px solid rgba(0, 211, 189, 0.15);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.trend-sheets-container .window-btn {
  padding: var(--spacing-sm) 14px;
  background: transparent;
  border: none;
  color: rgba(0, 211, 189, 0.6);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.trend-sheets-container .window-btn:hover {
  color: var(--color-accent-bright);
}

.trend-sheets-container .window-btn.active {
  background: var(--gradient-primary);
  color: var(--color-bg-primary);
  box-shadow: 0 2px 8px rgba(0, 211, 189, 0.25);
}

.trend-sheets-container .header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* Parlay Counter */
.trend-sheets-container .parlay-count {
  padding: var(--spacing-sm) 14px;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-accent);
}

/* Build Parlay Button */
.trend-sheets-container .build-btn {
  padding: 10px var(--spacing-xl);
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-bg-primary);
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-semibold);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 211, 189, 0.3);
}

.trend-sheets-container .build-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 211, 189, 0.4);
  transform: translateY(-1px);
}

/* ==============================================
   FILTERS BAR
   ============================================== */
.trend-sheets-container .filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px var(--spacing-2xl);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-wrap: wrap;
}

.trend-sheets-container .filters-bar.options-open {
  border-bottom: none;
}

/* Filter Pills - Clean pill buttons */
.trend-sheets-container .filter-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.08) 0%, rgba(0, 211, 189, 0.02) 100%);
  border: 1px solid rgba(0, 211, 189, 0.15);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: rgba(0, 245, 212, 0.85);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.trend-sheets-container .filter-pill:hover {
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.15) 0%, rgba(0, 211, 189, 0.05) 100%);
  border-color: rgba(0, 211, 189, 0.3);
  color: rgba(0, 245, 212, 1);
}

.trend-sheets-container .filter-pill.active {
  background: var(--gradient-primary);
  border-color: rgba(0, 245, 212, 0.5);
  color: var(--color-bg-primary);
  box-shadow: 0 2px 8px rgba(0, 211, 189, 0.25);
}

.trend-sheets-container .filter-pill.expanded {
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.2) 0%, rgba(0, 211, 189, 0.1) 100%);
  border-color: rgba(0, 211, 189, 0.4);
  color: rgba(0, 245, 212, 1);
}

.trend-sheets-container .filter-pill .pill-text {
  white-space: nowrap;
}

/* Filter Options Row - Inline with filters bar */
.trend-sheets-container .filter-options-row {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 0 var(--spacing-2xl) 14px var(--spacing-2xl);
}

.trend-sheets-container .filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.trend-sheets-container .filter-option {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.trend-sheets-container .filter-option:hover {
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.15) 0%, rgba(0, 211, 189, 0.05) 100%);
  border-color: rgba(0, 211, 189, 0.3);
  color: var(--color-text-primary);
}

.trend-sheets-container .filter-option.active {
  background: var(--gradient-primary);
  border-color: rgba(0, 245, 212, 0.5);
  color: var(--color-bg-primary);
  box-shadow: 0 2px 6px rgba(0, 211, 189, 0.2);
}

/* Matchup options in filter row */
.trend-sheets-container .filter-options .matchups-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.trend-sheets-container .filter-options .matchups-option:hover {
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.15) 0%, rgba(0, 211, 189, 0.05) 100%);
  border-color: rgba(0, 211, 189, 0.3);
}

.trend-sheets-container .filter-options .matchups-option input[type="checkbox"] {
  display: none;
}

.trend-sheets-container .filter-options .matchups-day-group {
  display: block;
}

.trend-sheets-container .filter-options .matchups-day-group + .matchups-day-group {
  margin-top: 8px;
}

.trend-sheets-container .filter-options .matchups-day-header {
  width: 100%;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
  padding-bottom: 4px;
}

.trend-sheets-container .filter-options .matchups-day-header:first-child {
  margin-top: 0;
}

.trend-sheets-container .filter-options .divider {
  display: none;
}

/* Matchups menu when shown inline in filter options row */
.trend-sheets-container .filter-options .matchups-menu {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
}

/* Legacy filter-chip styles (backwards compat) */
.trend-sheets-container .filter-chip {
  display: none;
}

/* ==============================================
   MATCHUPS CONTAINER
   ============================================== */
.trend-sheets-container .matchups-container {
  padding: var(--spacing-xl) var(--spacing-2xl);
}

/* ==============================================
   MATCHUP GROUP
   ============================================== */
.trend-sheets-container .matchup-group {
  margin-bottom: var(--spacing-2xl);
}

.trend-sheets-container .matchup-group:last-child {
  margin-bottom: 0;
}

/* Matchup Header */
.trend-sheets-container .matchup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(0, 211, 189, 0.08), rgba(0, 211, 189, 0.02));
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: var(--spacing-md);
}

.trend-sheets-container .matchup-teams {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trend-sheets-container .team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trend-sheets-container .team-abbr {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #001E37, #021225);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  border: 1px solid var(--color-accent-border);
}

.trend-sheets-container .team-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.trend-sheets-container .team-name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
}

.trend-sheets-container .vs-text {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.trend-sheets-container .matchup-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.trend-sheets-container .matchup-time {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

.trend-sheets-container .trends-count {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  padding: var(--spacing-xs) 10px;
  background: rgba(0, 211, 189, 0.06);
  border-radius: var(--radius-xl);
}

/* ==============================================
   TRENDS LIST (within matchup)
   ============================================== */
.trend-sheets-container .trends-in-matchup {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding-left: 18px;
}

/* ==============================================
   TREND ITEM (individual row)
   ============================================== */
.trend-sheets-container .trend-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 14px var(--spacing-lg);
  background: var(--color-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  cursor: default;
}

.trend-sheets-container .trend-item:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-strong);
}

.trend-sheets-container .trend-item.selected {
  background: rgba(0, 211, 189, 0.08);
  border-color: var(--color-accent-border);
}

/* Player Info (name + position) - clickable area for navigation */
.trend-sheets-container .player-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.trend-sheets-container .player-info:hover .player-name {
  text-decoration: underline;
}

.trend-sheets-container .player-name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-sheets-container .player-pos {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

/* Prop + Odds - clickable area for navigation */
.trend-sheets-container .prop-odds {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  cursor: pointer;
}

.trend-sheets-container .prop-text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
}

.trend-sheets-container .odds-badge {
  padding: 5px var(--spacing-md);
  background: var(--color-success-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  color: var(--color-success);
}

/* Hit Rate Display */
.trend-sheets-container .hitrate-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}

/* Individual hit/miss bars container */
.trend-sheets-container .hit-rate-bars {
  display: flex;
  gap: 3px;
  align-items: center;
}

.trend-sheets-container .hit-rate-bars .bar {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.trend-sheets-container .hit-rate-bars .bar.hit {
  background: #22c55e;
}

.trend-sheets-container .hit-rate-bars .bar.miss {
  background: #ef4444;
}

.trend-sheets-container .hitrate-text {
  font-size: .9rem;
  color: var(--color-text-secondary);
  text-align: right;
  white-space: nowrap;
}

/* Add Button */
.trend-sheets-container .add-btn {
  width: 36px;
  height: 36px;
  margin-left: 12px;
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.15) 0%, rgba(0, 211, 189, 0.05) 100%);
  border: 1px solid rgba(0, 211, 189, 0.25);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.trend-sheets-container .add-btn:hover {
  background: linear-gradient(180deg, rgba(0, 211, 189, 0.25) 0%, rgba(0, 211, 189, 0.1) 100%);
  border-color: rgba(0, 211, 189, 0.4);
  transform: scale(1.05);
  box-shadow: 0 2px 12px rgba(0, 211, 189, 0.2);
}

.trend-sheets-container .trend-item.selected .add-btn,
.trend-sheets-container .add-btn.added {
  background: var(--gradient-primary);
  border-color: rgba(0, 245, 212, 0.5);
  color: var(--color-bg-primary);
  box-shadow: 0 2px 8px rgba(0, 211, 189, 0.3);
}

/* Empty state */
.trend-sheets-container .trend-empty {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-tertiary);
}

/* ==============================================
   MATCHUP DROPDOWN (for filter)
   ============================================== */
.trend-sheets-container .matchups-dropdown {
  position: relative;
  display: inline-block;
}

.trend-sheets-container .matchups-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-family: var(--font-family-sans);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 11px 11px;
}

.trend-sheets-container .matchups-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.trend-sheets-container .matchups-dropdown.open .matchups-toggle {
  background: var(--color-accent-subtle);
  border-color: var(--color-accent-border);
  color: var(--color-accent);
}

/* Dropdown Menu - shared styling for both in-container and portaled */
.trend-sheets-container .matchups-menu,
[id^="trend-matchups-portal-"] .matchups-menu {
  z-index: 2000;
  width: 100%;
  min-width: 300px;
  max-width: 380px;
  max-height: 400px;
  overflow: auto;
  border: 1px solid #11394A;
  border-radius: 12px;
  background: #021225;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  padding: 16px;
  display: none;
}

.trend-sheets-container .matchups-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
}

.trend-sheets-container .matchups-dropdown.open .matchups-menu,
.trend-sheets-container .matchups-menu[data-open="true"],
[id^="trend-matchups-portal-"] .matchups-menu[data-open="true"] {
  display: block;
}

[id^="trend-matchups-portal-"] {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
}

[id^="trend-matchups-portal-"] .matchups-menu {
  position: fixed;
  pointer-events: auto;
}

/* Hide checkbox, use background for selected state */
.trend-sheets-container .matchups-option input[type="checkbox"],
[id^="trend-matchups-portal-"] .matchups-option input[type="checkbox"] {
  display: none;
}

.trend-sheets-container .matchups-option:has(input:checked),
[id^="trend-matchups-portal-"] .matchups-option:has(input:checked) {
  background: rgba(0, 211, 189, 0.15);
  border: 1px solid rgba(0, 211, 189, 0.3);
}

.trend-sheets-container .matchups-option:hover,
[id^="trend-matchups-portal-"] .matchups-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.trend-sheets-container .matchups-option:has(input:checked):hover,
[id^="trend-matchups-portal-"] .matchups-option:has(input:checked):hover {
  background: rgba(0, 211, 189, 0.2);
}

/* All/None row - display on one line */
.trend-sheets-container .matchups-all-none-row,
[id^="trend-matchups-portal-"] .matchups-all-none-row,
.trend-sheets-container .filter-options .matchups-all-none-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
}

.trend-sheets-container .matchups-menu .divider,
[id^="trend-matchups-portal-"] .matchups-menu .divider {
  height: 1px;
  margin: 12px 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}

/* Day Group Styling */
.trend-sheets-container .matchups-day-group,
[id^="trend-matchups-portal-"] .matchups-day-group {
  margin-bottom: 0;
}

.trend-sheets-container .matchups-day-group + .matchups-day-group,
[id^="trend-matchups-portal-"] .matchups-day-group + .matchups-day-group {
  margin-top: 12px;
}

/* Matchups grid layout - NBA: all matchups, NFL: only Sunday */
.trend-sheets-container .matchups-day-items,
[id^="trend-matchups-portal-"] .matchups-day-items {
  display: flex;
  flex-direction: column;
}

/* NBA: Grid for all day groups */
#trend-sheets-container-nba .matchups-day-items,
#trend-sheets-container-nba .filter-options .matchups-day-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* NFL: Grid only for Sunday (day 0) */
#trend-sheets-container-nfl .matchups-day-group[data-day="0"] .matchups-day-items,
#trend-sheets-container-nfl .filter-options .matchups-day-group[data-day="0"] .matchups-day-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}


.trend-sheets-container .matchups-day-header,
[id^="trend-matchups-portal-"] .matchups-day-header {
  display: flex;
  align-items: center;
  padding: 8px 12px 8px 12px !important;
  font-size: .75rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #00D3BD;
  background: rgba(0, 211, 189, 0.08);
  border-radius: 6px;
  margin-bottom: 6px;
}

/* Matchup option with time */
.trend-sheets-container .matchups-option,
[id^="trend-matchups-portal-"] .matchups-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  font-size: 0.875rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.trend-sheets-container .matchups-option .matchup-teams-display,
[id^="trend-matchups-portal-"] .matchups-option .matchup-teams-display {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.trend-sheets-container .matchups-option .team-name,
[id^="trend-matchups-portal-"] .matchups-option .team-name {
  white-space: nowrap;
  font-weight: var(--font-weight-normal);
}

.trend-sheets-container .matchups-option .at-symbol,
[id^="trend-matchups-portal-"] .matchups-option .at-symbol {
  color: var(--color-text-muted);
  margin: 0 2px;
}

.trend-sheets-container .matchups-option .matchup-text,
[id^="trend-matchups-portal-"] .matchups-option .matchup-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-sheets-container .matchups-option .matchup-logo,
[id^="trend-matchups-portal-"] .matchups-option .matchup-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.trend-sheets-container .matchups-option .matchup-time-label,
[id^="trend-matchups-portal-"] .matchups-option .matchup-time-label {
  font-size: 0.75rem;
  color: #b4d7c4;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS
   ============================================== */

/* Full width on mobile/tablet */
@media (max-width: 1000px) {
  .trend-sheets-container,
  .trend-sheets-container.is-visible {
    padding: 0 !important;
    margin: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .trend-sheets-container .trend-sheets {
    margin: 0;
    margin-top: -8px;
    max-width: 100%;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  /* Hide gradient accent line at top on mobile */
  .trend-sheets-container .trend-sheets::before {
    display: none;
  }

  .trend-sheets-container .matchups-toggle {
    padding: 15px 14px !important;
  }
}

@media (max-width: 768px) {
  .trend-sheets-container .trend-sheets {
    border-radius: 0;
  }

  .trend-sheets-container .page-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
  }

  .trend-sheets-container .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .trend-sheets-container .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .trend-sheets-container .filters-bar {
    overflow-x: auto;
    padding: 20px 16px;
    gap: 8px;
  }

  .trend-sheets-container .filter-pill {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .trend-sheets-container .filter-options-row {
    padding: 0 16px 12px 16px;
  }

  .trend-sheets-container .filter-option {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .trend-sheets-container .matchups-container {
    padding: 16px;
  }

  .trend-sheets-container .matchup-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
  }

  .trend-sheets-container .matchup-meta {
    width: 100%;
    justify-content: space-between;
  }

  .trend-sheets-container .trends-in-matchup {
    padding-left: 0;
  }

  .trend-sheets-container .trend-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .trend-sheets-container .prop-odds {
    justify-content: space-between;
  }

  .trend-sheets-container .hitrate-display {
    width: 100%;
    align-items: flex-start;
  }

  .trend-sheets-container .add-btn {
    width: 100%;
    height: 40px;
    border-radius: 8px;
  }
}

@media (max-width: 1000px) and (min-width: 769px) {
  .trend-sheets-container .page-title {
    font-size: 1.6rem;
  }

  .trend-sheets-container .window-btn {
    padding: 8px 12px;
    font-size: 1rem;
  }

  .trend-sheets-container .filter-chip {
    padding: 8px 12px;
    font-size: 1rem;
  }

  .trend-sheets-container .player-name {
    font-size: 1rem;
  }

  .trend-sheets-container .prop-text {
    font-size: 1rem;
  }

  .trend-sheets-container .team-name {
    font-size: 1rem;
  }

  .trend-sheets-container .add-btn {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }
}

/* Large mobile / tablet specific */
@media (max-width: 1000px) {
  .trend-sheets-container .filters-bar {
    padding: 24px 16px;
  }

  .trend-sheets-container .filter-pill {
    padding: 14px 22px;
    font-size: 1.1rem;
  }

  /* Use flexible grid for trend items */
  .trend-sheets-container .trend-item {
    grid-template-columns: minmax(200px, 1fr) minmax(150px, 1fr) 100px 52px;
  }

  /* Allow player name to show fully */
  .trend-sheets-container .player-name {
    font-size: 1.1rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .trend-sheets-container .player-info {
    flex-wrap: wrap;
  }

  .trend-sheets-container .page-title {
    font-size: 1.8rem;
  }

  .trend-sheets-container .window-btn {
    padding: 8px 20px;
    font-size: 1.35rem;
  }

  .trend-sheets-container .build-btn {
    padding: 12px 20px;
    font-size: 1.1rem;
  }

  .trend-sheets-container .parlay-count {
    display: none !important;
  }

  .trend-sheets-container .filter-chip {
    padding: 10px 16px;
    font-size: 1.1rem;
  }

  .trend-sheets-container .filter-chip select {
    font-size: 1.1rem;
  }

  .trend-sheets-container .filter-pill {
    padding: 12px 20px;
    font-size: 1.1rem;
  }

  .trend-sheets-container .filter-options-row {
    padding: 0 16px 16px 16px;
  }

  .trend-sheets-container .filter-option {
    padding: 12px 18px;
    font-size: 1.1rem;
  }

  .trend-sheets-container .team-abbr {
    width: 44px;
    height: 44px;
    font-size: 0.8rem;
  }

  .trend-sheets-container .team-logo {
    width: 44px;
    height: 44px;
  }

  .trend-sheets-container .team-name {
    font-size: 1.1rem;
  }

  .trend-sheets-container .player-pos {
    padding: 4px 8px;
    font-size: 0.85rem;
  }

  .trend-sheets-container .prop-text {
    font-size: 1.1rem;
  }

  .trend-sheets-container .odds-badge {
    font-size: 1rem;
    padding: 6px 14px;
  }

  .trend-sheets-container .trends-count {
    font-size: 1.1rem;
    padding: 8px 14px;
  }

  .trend-sheets-container .matchup-time {
    font-size: 1.1rem;
  }

  .trend-sheets-container .hit-rate-bars .bar {
    width: 16px;
    height: 16px;
    border-radius: 4px;
  }

  .trend-sheets-container .hitrate-text {
    font-size: 1.25rem;
  }

  .trend-sheets-container .add-btn {
    width: 52px;
    height: 48px;
    font-size: 1.5rem;
  }

  .trend-sheets-container .matchups-menu,
  [id^="trend-matchups-portal-"] .matchups-menu {
    min-width: 340px;
    max-width: 600px;
    max-height: 60vh;
    font-size: 2.4rem;
    padding: 28px;
  }

  .trend-sheets-container .matchups-day-group,
  [id^="trend-matchups-portal-"] .matchups-day-group {
    margin-bottom: 28px;
  }

  /* Reduce grid to 2 columns on mobile */
  #trend-sheets-container-nba .matchups-day-items,
  #trend-sheets-container-nba .filter-options .matchups-day-items,
  #trend-sheets-container-nfl .matchups-day-group[data-day="0"] .matchups-day-items,
  #trend-sheets-container-nfl .filter-options .matchups-day-group[data-day="0"] .matchups-day-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .trend-sheets-container .matchups-day-header,
  [id^="trend-matchups-portal-"] .matchups-day-header {
    padding: 16px 20px;
    font-size: 1.25rem !important;
    margin-bottom: 14px;
  }

  .trend-sheets-container .matchups-option,
  [id^="trend-matchups-portal-"] .matchups-option {
    padding: 20px 22px;
    font-size: 2.25rem;
    gap: 18px;
    min-height: 72px;
  }

  .trend-sheets-container .matchups-option .matchup-logo,
  [id^="trend-matchups-portal-"] .matchups-option .matchup-logo {
    width: 36px;
    height: 36px;
  }

  .trend-sheets-container .matchups-option .team-name,
  [id^="trend-matchups-portal-"] .matchups-option .team-name {
    font-size: 1.25rem;
  }

  .trend-sheets-container .matchups-option .at-symbol,
  [id^="trend-matchups-portal-"] .matchups-option .at-symbol {
    font-size: 1.25rem;
  }

  .trend-sheets-container .matchups-option .matchup-time-label,
  [id^="trend-matchups-portal-"] .matchups-option .matchup-time-label {
    font-size: 1.25rem;
    padding: 6px 10px;
  }

  .trend-sheets-container .matchups-all-none-row .matchups-option,
  [id^="trend-matchups-portal-"] .matchups-all-none-row .matchups-option {
    font-size: 1.25rem;
    font-weight: var(--font-weight-normal);
    width: 150px;
    justify-content: center;
  }

  /* Make divider more visible on mobile */
  .trend-sheets-container .matchups-menu .divider,
  [id^="trend-matchups-portal-"] .matchups-menu .divider {
    margin: 20px 12px;
  }
}
