/* =====================================================
   ⚾ Baseball Dashboard Styles
   Author: Bob Rosa
   Path: /home/bobnet/baseball/dashboard/assets/style.css
   ===================================================== */

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #101010;
  color: #fff;
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  background-color: #333333;    
  text-align: center;
  margin-top: 20px;
}

/* === Grid layout for team/game cards === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px;
}

/* === Card container === */
.card, .column {
  background-color: #1b1b1b;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
  text-align: center;
}

/* === Logo images === */
.logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 10px auto;
  display: block;
}

/* === Roster Link Buttons === */



.column h3 a:hover {
  background-color: #f0f0f0;
  color: #d00000;                /* red hover accent */
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* === Buttons / back links === */
a.back-link {
  display: inline-block;
  background: #ffffff;
  color: #000;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
}

a.back-link:hover {
  background-color: #f0f0f0;
  color: #c00000;
}

/* === Tables (GLOBAL) === */
table {
  border-collapse: collapse;
  margin: 10px 0;
}

th, td {
  border: 1px solid #333;
  padding: 8px;
}

th {
  background-color: #222;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

tr:nth-child(even) {
  background-color: #181818;
}

/* === Horizontal Scroll Wrapper (Option A) === */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.game-table {
    border-collapse: collapse;
    min-width: 1200px;   /* ← THIS is the key */
}

.game-table th,
.game-table td {
    white-space: nowrap;
    padding: 6px 10px;
    border: 1px solid #ccc;
}

/* Sticky first column */
.game-table th:first-child,
.game-table td:first-child {
  position: sticky;
  left: 0;
  background-color: #111;
  z-index: 3;
  font-weight: bold;
}

.carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px;
}

.carousel::-webkit-scrollbar { display: none; }

.carousel-container {
    position: relative;
}

.carousel {
    position: relative;
    z-index: 1;
}

.scroll-btn {
    z-index: 2;
    pointer-events: auto;
}

.carousel a.card {
    pointer-events: auto;
}




.card {
  flex: 0 0 auto;
  width: 190px;
  padding: 12px;
  background: #0b162a;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #1f3b63;
}

.card:hover {
  background: #122b45;
}

.card .date {
  font-size: 13px;
  opacity: 0.85;
}

.card .matchup {
  font-weight: bold;
  margin: 6px 0;
}

.card .score {
  font-size: 14px;
}

.score.W { color: #4caf50; }
.score.L { color: #f44336; }

.team-header-center > p {
    margin: 4px 0;
    font-size: 14px;
}

.team-header-meta {
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.95;
}

.team-header-meta span {
    margin-right: 12px;
    white-space: nowrap;
}

.team-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px 0 20px;
}

.team-controls .season-select {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.team-controls .season-select form {
    display: inline-flex;
    align-items: center;
}

/* 🔥 THIS IS THE CRITICAL OVERRIDE */
.team-controls .season-select label {
    display: inline-block;
    margin-right: 8px;
}


 

.team-controls .month-tabs {
    margin: 0;
}



.month-tabs {
    text-align: center;
    
}

.month-tabs a {
    display: inline-block;
    margin: 4px 6px;
    padding: 6px 12px;
    border-radius: 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.month-tabs a:hover {
    background: #ddd;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(
        135deg,
        rgba(0,0,0,.65),
        rgba(0,0,0,.25)
    ), var(--team-color);
    color: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 1200px;
    margin: 20px auto;
}

.player-header img {
    height: 90px;
    width: auto;
    filter: drop-shadow(0 0 6px rgba(0,0,0,.6));
}

.player-header h1 {
    margin: 0;
    font-size: 34px;
}

.player-header h2 {
    margin-top: 6px;
    font-weight: normal;
    font-size: 16px;
    opacity: 0.95;
}

.team-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.team-logo {
    height: 90px;
    width: auto;
}

.stat-table th {
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none;
}

.stat-table th:hover {
    background-color: #343a40;
}

.sort-asc::after {
    content: " ▲";
    font-size: 0.75em;
}

.sort-desc::after {
    content: " ▼";
    font-size: 0.75em;
}

/* =====================================================
   ▶ Team Boxscore Carousel Controls
   ===================================================== */

.carousel-container {
  position: relative;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 25, 40, 0.9);
  color: #fff;
  border: 1px solid #1f3b63;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  z-index: 5;
}

.scroll-btn:hover {
  background: #122b45;
}

.left-btn {
  left: 5px;
}

.right-btn {
  right: 5px;
}

/* Prevent arrows on very small screens */
@media (max-width: 600px) {
  .scroll-btn {
    display: none;
  }
}

.card.W {
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
}

.card.L {
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.7);
}

/* Roster table player links */
.roster-table a {
    color: #fff !important;
    text-decoration: none;
}

.roster-table a:hover {
    color: #ddd;
    text-decoration: underline;
}

.season-scroll {
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding:10px 16px;
    margin:0 20px 10px;
    scrollbar-width: thin;
}

.season-scroll a {
    padding:6px 14px;
    border-radius:16px;
    background:#eee;
    text-decoration:none;
    font-weight:600;
    white-space:nowrap;
    color:#000;
}

.season-scroll a.active {
    background:#333;
    color:#fff;
}

.season-scroll a:hover {
    background:#ccc;
}

.career-row {
    position: sticky;
    bottom: 0;
    z-index: 3;
}
 
h3.mb-4 {
    /* Optional: ensure inline elements align nicely */
    font-weight: normal; /* or keep your existing styles */
}

h3.mb-4 span.pitcher {
    margin-left: 1em; /* Adds space before each pitcher label */
    white-space: nowrap; /* Prevents line breaks inside each label */
}

/* Optional: no margin for the first pitcher span after the score */
h3.mb-4 span.pitcher:first-of-type {
    margin-left: 0;
}
 
 
.btn-group .btn {
    min-width: 80px;
}
.schedule-container {
  margin-top: 2rem;
}

.game-card {
  background: #fff;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-teams {
  font-weight: 600;
}

.game-link {
  background: #198754;
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-decoration: none;
}

.game-link:hover {
  background: #157347;
}

.table-container {
    max-height: 500px;   /* adjust height as you want */
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 8px;
}

thead th {
    position: sticky;
    top: 0;
    background: #222;
    color: white;
    z-index: 2;
} 



/* === Mobile responsive === */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .column h3 a {
    width: 100%;
    display: block;
  }
}


/* =====================================================
   FORCE CENTERED SEASON SELECT (OVERRIDE ALL)
   ===================================================== */

.team-controls .season-select {
    width: 100%;
    display: flex;
    justify-content: center;
}

.team-controls .season-select form {
    display: inline-flex !important;
    align-items: center;
}

.team-controls .season-select label {
    display: inline !important;
    width: auto !important;
    margin-right: 8px;
}

.team-controls .season-select select {
    display: inline-block;
}