/* Scoped styling for mlb-and-nhl-historical-stats-lookup */
.mnhl-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text, #1e293b);
}

.mnhl-header {
  margin-bottom: 1.5rem;
}

.mnhl-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  background-color: #fee2e2;
  color: #b91c1c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.mnhl-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--color-heading, #0f172a);
}

.mnhl-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.5;
}

/* League bar */
.mnhl-league-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.mnhl-league-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mnhl-league-btn:hover {
  background: #e2e8f0;
}

.mnhl-league-btn.active {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(30, 58, 138, 0.2);
}

/* Ad slots */
.mnhl-ad-slot {
  margin: 1.5rem 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-subtle, #f8fafc);
  border: 1px dashed var(--color-border, #e2e8f0);
  border-radius: 0.5rem;
}

/* Main Grid */
.mnhl-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 960px) {
  .mnhl-main-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.mnhl-side-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Cards */
.mnhl-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mnhl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  padding-bottom: 0.75rem;
}

.mnhl-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-heading, #0f172a);
}

.mnhl-card-sub {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1rem 0;
}

.mnhl-badge-meta {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: #f1f5f9;
  border-radius: 0.25rem;
  color: #475569;
  font-weight: 600;
}

/* Controls */
.mnhl-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mnhl-search-wrap {
  flex: 1;
  min-width: 220px;
}

.mnhl-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  outline: none;
}

.mnhl-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.mnhl-filter-wrap {
  min-width: 160px;
}

.mnhl-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1e293b;
}

.mnhl-feed-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

.mnhl-count-text {
  font-weight: 600;
}

/* Records List */
.mnhl-records-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mnhl-record-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.mnhl-record-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
  gap: 0.5rem;
}

.mnhl-record-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

.mnhl-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.mnhl-tag-champ { background: #fef08a; color: #854d0e; }
.mnhl-tag-legend { background: #dbeafe; color: #1e40af; }
.mnhl-tag-mvp { background: #dcfce7; color: #15803d; }
.mnhl-tag-stat { background: #ede9fe; color: #6b21a8; }

.mnhl-record-desc {
  margin: 0 0 0.5rem 0;
  font-size: 0.835rem;
  color: #475569;
  line-height: 1.4;
}

.mnhl-record-meta {
  font-size: 0.775rem;
  color: #64748b;
}

.mnhl-record-meta strong {
  color: #334155;
}

/* H2H Comparator */
.mnhl-h2h-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.mnhl-h2h-select-wrap {
  flex: 1;
}

.mnhl-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.mnhl-select-sm {
  width: 100%;
  padding: 0.45rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1e293b;
}

.mnhl-vs-badge {
  font-size: 0.75rem;
  font-weight: 900;
  color: #94a3b8;
  padding: 0.25rem;
  margin-top: 1rem;
}

.mnhl-h2h-table-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow-x: auto;
}

.mnhl-h2h-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.825rem;
}

.mnhl-h2h-table th {
  background: #f1f5f9;
  padding: 0.6rem 0.5rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}

.mnhl-h2h-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.mnhl-h2h-table td:nth-child(2) {
  font-weight: 600;
  color: #64748b;
  background: #ffffff;
}

.mnhl-stat-win {
  font-weight: 800;
  color: #15803d;
  background: #f0fdf4;
}

/* Glossary */
.mnhl-metrics-glossary {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mnhl-glossary-item {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 0.375rem;
  border-left: 3px solid #3b82f6;
}

.mnhl-glossary-item strong {
  color: #0f172a;
}

.mnhl-left-section {
  position: relative;
}
