
/* This adds the emoji automatically before the text */
.gold-label::before {
  content: "ðŸ¥‡ ";
}

.silver-label::before {
  content: "ðŸ¥ˆ ";
}

.bronze-label::before {
  content: "ðŸ¥‰ ";
}  

/* Target the logo images specifically */
.img42 {
  width: 42px;
  height: 42px;
  object-fit: contain;      /* Ensures the logo doesn't stretch */
  background-color: #fff;   /* Fills in any transparency with white */
  border-radius: 50%;       /* The magic "circle" line */
  
  /* The Light Border */
  border: 1px solid #ddd;   /* Light grey border */
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Subtle depth */
  
  /* Transition for a nice hover effect */
  transition: transform 0.2s ease-in-out;
}

/* Optional: Make them pop slightly when hovered */
.img42:hover {
  transform: scale(1.1);
  border-color: #007bff; /* Highlights the border on hover */
}
/* Base style for the row highlight */
.gold-row { background-color: #FFF9E6 !important; }
.silver-row { background-color: #F2F4F5 !important; }
.bronze-row { background-color: #FDF2EC !important; }

/* Optional: Add a thick "accent" border on the far left of the row */
.gold-row td:first-child { border-left: 5px solid #FFD700; }
.silver-row td:first-child { border-left: 5px solid #C0C0C0; }
.bronze-row td:first-child { border-left: 5px solid #CD7F32; }

/* Keep the team names dark for readability */
.gold-row a, .silver-row a, .bronze-row a {
    color: #1a1a1a !important;
    font-weight: 600; /* Makes the text pop slightly more against the tint */
}
</style>
<style>
/* ==========================================
   1. GLOBAL LAYOUT & CONTAINERS
   ========================================== */
/* Update these 3 classes in your CSS */

.schedule-container {
  font-family: Arial, sans-serif;
  width: 100%; /* Changed */
  overflow-x: auto;
  margin-top: 20px; /* Kept for spacing */
}

/* 1. Remove the sticky rules from the action bar */
.action-bar {
  width: 100%; 
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  /* (Removed position: sticky and z-index from here) */
}
/* 2. Apply the sticky rules to the entire row wrapper instead */
.controls-container {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  gap: 15px; 
  align-items: center; 
  
  /* NEW: Sticky settings applied to the parent */
  position: -webkit-sticky; /* For older Safari support */
  position: sticky;
  top: 50px; /* Adjust this to sit right below your red Houzez header! */
  z-index: 99;
  background-color: #fff; /* Prevents the table from bleeding through */
  padding: 15px 0; /* Gives it some breathing room */
  border-bottom: 1px solid #f4f4f4; /* Optional: adds a nice visual edge when scrolling */
  transition: box-shadow 0.2s ease-in-out;
}
/* The shadow class we will trigger with JavaScript */
.controls-container.is-stuck {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.col-center, 
.cell-center {
  text-align: center;
}

.sub-text {
  display: block;
  font-size: 0.85em;
  color: #333;
  margin-top: 4px;
}

.map-link {
  color: #007bff;
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

/* ==========================================
   2. CONTROLS (DROPDOWNS, PILLS & BUTTONS)
   ========================================== */
.custom-select-wrapper {
  position: relative;
  width: 350px; 
  max-width: 100%;
}

#league-selector, 
#team-selector,
#rink-selector {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-family: Arial, sans-serif;
  font-size: 1em;
  font-weight: bold;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  appearance: none; 
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 16px top 50%;
  background-size: 12px auto;
}

#league-selector:focus,
#team-selector:focus,
#rink-selector:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#date-pills-container {
  display: flex;
  flex-wrap: wrap; 
  gap: 10px;
}

.date-pill {
  padding: 8px 16px;
  background-color: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.date-pill:hover { background-color: #e0e0e0; }
.date-pill.active {
  background-color: #ff6b54; 
  color: white;
  border-color: #ff6b54;
}



/* ==========================================
   3. DESKTOP TABLE STYLING
   ========================================== */
#schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

#schedule-table th, 
#schedule-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

#schedule-table th {
  font-weight: bold;
  border-bottom: 2px solid #e0e0e0;
  color: #000;
  background-color: #f4f4f4; 
}

.game-cell {
  display: grid;
  grid-template-columns: 1fr auto 1fr; 
  align-items: center;
  gap: 15px; 
  width: 100%;
  font-weight: bold;
  font-size: 1.1em;
}

.team-left {
  display: flex;
  align-items: center;
  justify-content: flex-end; 
  gap: 12px;
  text-align: right;
}

.team-right {
  display: flex;
  align-items: center;
  justify-content: flex-start; 
  gap: 12px;
  text-align: left;
}

.at-symbol {
  color: #666;
  font-size: 0.9em;
  font-weight: normal;
  text-align: center;
}

.team-logo {
  flex-shrink: 0;
  width: 42px; 
  height: 42px;
  object-fit: contain;
}

/* ==========================================
   4. MOBILE CARD BASE STYLING
   ========================================== */
.mobile-date-header {
  background-color: #ff6b54; 
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 1.25em; 
  padding: 14px; 
  margin-top: 20px;
}

.mobile-date-header:first-child { margin-top: 0; }

.mobile-game-card {
  background-color: #fff;
  padding: 16px 10px;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
}

.mobile-time {
  font-size: 1.25em; 
  font-weight: bold;
  margin-bottom: 12px;
}

.mobile-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 15px;
  font-weight: bold;
  font-size: 1.25em; 
  margin-bottom: 16px;
}

.mobile-teams .team-left,
.mobile-teams .team-right {
  flex-wrap: nowrap !important;
  gap: 8px; 
}

.mobile-teams .team-left span,
.mobile-teams .team-right span {
  word-break: break-word;
  line-height: 1.2;
}

.mobile-location {
  font-size: 1.15em; 
  color: #222;
  line-height: 1.4;
}

/* ==========================================
   5. ACTION LINKS (BOXSCORE, WEBCAST, ETC)
   ========================================== */
.action-links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.action-link {
  display: inline-block;
  padding: 4px 8px;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  font-size: 0.85em;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.action-link:hover {
  background-color: #007bff;
  color: white;
}

.link-webcast {
  background-color: #dc3545; 
  color: white;
}

.link-webcast:hover { background-color: #c82333; }

.mobile-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #eee;
}

/* Legacy Preview Action (Optional if still used) */
.preview-action {
  font-weight: bold;
  cursor: pointer;
  text-align: right;
}  

/* ==========================================
   6. RESPONSIVE DESIGN TOGGLES & OVERRIDES
   ========================================== */

/* Show desktop table, hide mobile layout by default */
@media (min-width: 769px) {
  .desktop-view { display: table !important; }
  .mobile-view { display: none !important; }
}

/* All Mobile Changes (Screens smaller than 768px) */
@media (max-width: 768px) {
  /* Toggle Layouts */
  .desktop-view { display: none !important; }
  .mobile-view { display: block !important; }

  /* Add padding to the edges to create "breathing room" */
  .controls-container,
  .action-bar,
  .schedule-container {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box; 
  }

  /* Stack dropdowns */
  .controls-container {
    flex-direction: column; 
    gap: 10px; 
  }
  
  .custom-select-wrapper { width: 100%; }

  /* Stack and tighten action bar/pills */
  .action-bar {
    flex-direction: column; 
    align-items: stretch;   
  }

  #date-pills-container {
    justify-content: center; 
    gap: 6px; 
  }

  .date-pill {
    padding: 6px 10px; 
    font-size: 0.85em; 
  }

 
}

/* --- SCORE & STATUS STYLING --- */
.score-display {
  font-size: 1.4em;
  font-weight: 900;
  color: #222;
  text-align: center;
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-align: center;
}

.badge-final {
  background-color: #555;
  color: white;
}

.badge-live {
  background-color: #dc3545;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Winner/Loser formatting */
.team-winner {
  font-weight: 900;
  color: #000;
}

.team-loser {
  font-weight: normal;
  color: #777; /* Fades the losing team slightly */
}

/* ==========================================
   7. PAGINATION CONTROLS
   ========================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.page-btn {
  padding: 8px 14px;
  border: 1px solid #007bff;
  background-color: #fff;
  color: #007bff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95em;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background-color: #e6f2ff;
}

.page-btn.active {
  background-color: #007bff;
  color: white;
}

.page-btn:disabled {
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
  background-color: #fafafa;
}

/* Force Houzez Theme wrappers to allow sticky elements */
body, 
html, 
.main-wrap, 
.page-template {
    overflow: visible !important;
    overflow-x: clip !important; /* 'clip' prevents horizontal scrollbars without breaking sticky! */
}
/* Keep team names looking like normal text in the schedule */
a.team-link {
    color: inherit !important; /* Inherits the exact color the span had */
    text-decoration: none !important; /* Removes the underline */
}

/* Optional: Add a subtle underline only when someone hovers over it so they know it's clickable */
a.team-link:hover {
    text-decoration: underline !important;
}
/* ==========================================
   PLAYOFF GAME HIGHLIGHTING
   ========================================== */
/* Desktop Row Styling */
.playoff-row td {
    background-color: #f0f8ff !important; /* A very light 'Alice Blue' */
    border-top: 2px solid #bfe0ff;        /* Distinct icy blue borders */
    border-bottom: 2px solid #bfe0ff;
}

/* Make the game number bold to stand out a bit more */
.playoff-row td.cell-center:first-of-type {
    font-weight: 900;
    color: #0056b3; 
}

/* Mobile Card Styling */
.mobile-game-card.playoff-row {
    background-color: #f0f8ff !important;
    border: 2px solid #bfe0ff;
    border-left: 5px solid #0056b3; /* A thicker accent line on the left side */
}
/* Circular Team Logos (Matches Standings Page) */
.team-logo {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    object-fit: contain; /* Ensures rectangular logos aren't stretched/cut off */
    background-color: #ffffff;
    border-radius: 50%;
    border: 1px solid #ddd;
    padding: 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- WRAPPER FOR TOGGLE & PRINT ICON --- */
#watchlist-print-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 10px;
}

@media (min-width: 769px) {
    #watchlist-print-wrapper {
        width: auto !important;
        margin-left: auto !important; /* Pushes to the right on desktop */
        gap: 20px !important;
        margin-top: 0;
    }
}

/* --- PRINT BUTTON (ICON ONLY) --- */
#print-schedule-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: transparent !important; /* Removes the gray box */
    color: #333 !important; /* Standard dark icon color */
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: opacity 0.2s ease !important;
}

#print-schedule-btn:hover {
    background: transparent !important;
    opacity: 0.5 !important; /* Fades the icon slightly on hover */
}

/* --- WRAPPER FOR TOGGLE & BUTTON --- */
.bottom-controls-wrapper {
    display: flex !important;
    flex-direction: row !important; /* Forces side-by-side */
    flex-wrap: nowrap !important; /* Prevents stacking */
    align-items: center !important;
    justify-content: space-between !important; /* Pushes to opposite edges */
    width: 100% !important;
    margin-top: 5px;
}

@media (min-width: 769px) {
    .bottom-controls-wrapper {
        width: auto !important;
        margin-left: auto !important; /* Pushes to far right on desktop */
        margin-top: 0;
        gap: 20px;
    }
}

/* --- PRINT MODE OVERRIDES --- */
@media print {
    /* Hide everything by default */
    body * { visibility: hidden; }
    
    /* Make ONLY the schedule container visible */
    .schedule-container, .schedule-container * {
        visibility: visible;
    }
    
    /* Snap the table to the top left of the physical paper */
    .schedule-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Hide interactive elements and mobile layouts */
    .controls-container, #pagination-controls, .mobile-view, .action-cell, .map-link {
        display: none !important;
    }
    
    /* Force the desktop table to show with clean borders */
    .desktop-view {
        display: table !important;
        width: 100% !important;
        border-collapse: collapse;
    }
    #schedule-table th, #schedule-table td {
        border: 1px solid #000 !important;
        color: #000 !important;
        padding: 8px !important;
    }
    #schedule-table th {
        background-color: #eee !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Prevent games from breaking across pages */
    tr { page-break-inside: avoid; }
    
    /* Remove link colors */
    a { text-decoration: none !important; color: #000 !important; }
}

