/* games.css */

/* Layout and spacing */
.game-entry {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
}

@media (max-width: 768px) {
  .game-entry {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .game-thumb {
    margin: 0 0 12px 0;
  }
  .game-details {
    width: 100%;
  }
}

.game-thumb {
  width: 160px;
  height: auto;
  margin-right: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border: 2px solid #000;
}

.game-details { flex: 1; }

.game-title-link {
  font-size: 1.4rem;
  font-weight: 700;
  color: #000;
  text-decoration: none;
}
.game-title-link:hover { text-decoration: underline; }

.game-date { font-size: 0.95rem; color: #444; margin: 5px 0; }

.game-score { font-size: 1.2rem; font-weight: bold; margin: 5px 0; color: #0077cc; }

.game-summary { font-size: 1rem; line-height: 1.4; margin: 10px 0; }

.toggle-summary {
  color: #004488; font-weight: 600; margin-left: 8px; text-decoration: underline;
  cursor: pointer; display: inline; font-size: 0.9rem;
}
.toggle-summary:hover { color: #031e37; }

/* === Toggle Summary Button (Shared: Desktop + Mobile) === */
.toggle-summary-button {
  font-size: 0.95rem; font-weight: bold; text-decoration: underline;
  color: #004488; cursor: pointer; margin-left: 6px; display: inline;
}
.toggle-summary-button:hover { color: #031e37; }

.watch-buttons { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 12px; }
.watch-now-button {
  background-color: #cc0000; color: #fff; padding: 8px 16px; font-weight: bold;
  text-decoration: none; border-radius: 4px; display: inline-block; font-size: 0.95rem;
}
.watch-now-button:hover { background-color: #a00000; }
.tv-synced-button {
  background-color: #fcce00; color: #000; padding: 8px 16px; font-weight: bold;
  text-decoration: none; border-radius: 4px; display: inline-block; font-size: 0.95rem;
}
.tv-synced-button:hover { background-color: #f0c000; }

.top-controls {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}

/* Active filter summary (under Show Scores / Filter / Clear) */
.filter-summary {
  margin: 6px 0 14px;
  font-size: 0.95rem;
  color: #008000; /* match alternate-versions link green */
  line-height: 1.2;
}

.clear-filters-button, .filter-button, .toggle-scores-button {
  padding: 2px 10px; font-size: 1rem; line-height: 1.2; border: 1px solid #aaa;
  border-radius: 4px; cursor: pointer; font-weight: bold; height: 30px;
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.clear-filters-button { background-color: #cc0000; color: #fff; font-size: 1.2rem; text-align: center; }
.clear-filters-button:hover { background-color: #a00000; }
.filter-button { background-color: #dedede; color: #000; }
.filter-button:hover { background-color: #e5e5e5; }
.toggle-scores-button { background-color: #FCCE00; color: #000; border: 1px solid #ccc; }
.toggle-scores-button:hover { background-color: #f0c000; }

.report-link { color: #0077cc; font-size: 0.9rem; text-decoration: underline; cursor: pointer; align-self: center; }
.report-link:hover { color: #004488; }

.main-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.season-title { font-size: 2rem; font-weight: bold; margin: 20px 0; text-align: left; }

.season-divider-line { border-bottom: 2px solid #bbb; margin: 10px 0 20px; }

.hide-scores .game-score { display: none; }

.season-nav-buttons { display: flex; align-items: center; gap: 16px; margin-top: 0; }
.season-nav-button {
  background-color: #dedede; border: 1px solid #aaa; padding: 6px 12px; font-size: 0.9rem;
  font-weight: 600; text-decoration: none; color: #000; display: inline-block; border-radius: 4px;
}
.season-nav-button:hover { background-color: #e5e5e5; }

.season-logo { height: 40px; margin-right: 10px; vertical-align: middle; }

.season-header { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.season-header img { height: 48px; width: auto; }
.season-header .season-title { margin: 0; line-height: 1.2; }

.main-content-box { background-color: #f6f6f6; border-radius: 8px; padding: 20px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); margin-top: 20px; }

.flex-layout { display: flex; gap: 24px; }

.sidebar { width: 260px; background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); flex-shrink: 0; }

.sidebar-section { margin-bottom: 20px; }
.sidebar-section label, .sidebar-section strong { display: block; margin-bottom: 8px; font-size: 1rem; }
.sidebar-section select, .sidebar-section input[type="text"] {
  width: 100%; padding: 6px; font-size: 0.95rem; border: 1px solid #ccc; border-radius: 4px;
}
.sidebar-section ul { list-style: none; padding-left: 0; margin: 0; }
.sidebar-section li { margin: 8px 0; }
.sidebar-section a { color: #000; text-decoration: none; }
.sidebar-section a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .flex-layout { flex-direction: column; }
  .sidebar { display: none; }
}

.game-thumb {
  width: 160px !important; height: auto !important; object-fit: contain !important; flex-shrink: 1 !important;
}

/* ===== Filter Modal Styles ===== */
.modal-overlay {
  position: fixed; z-index: 9999; top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: center;
  box-sizing: border-box; padding: 20px;
}
.modal-content {
  background: #fff; color: #000; padding: 20px; border-radius: 10px; width: 300px; max-width: 90%;
  box-shadow: 0 0 10px rgba(0,0,0,0.4); font-family: Arial, sans-serif;
}
.modal-content h2 { margin-top: 0; }
.modal-content label { display: block; margin: 10px 0; font-size: 15px; }
.modal-content button {
  margin-top: 15px; padding: 8px 14px; font-size: 14px; font-weight: bold;
  background-color: #000; color: #ffc600; border: none; border-radius: 6px; cursor: pointer;
}
.modal-content button:hover { background-color: #333; }
.close { float: right; font-size: 22px; font-weight: bold; cursor: pointer; }
.clear-x { color: #fff !important; font-weight: bold; font-size: 20px; line-height: 1; }

/* Sidebar Photo Gallery Styles */
.sidebar-photo-gallery { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.sidebar-photo-gallery img {
  width: 100%; max-width: 270px; height: auto; display: block; border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.game-section-divider {
  font-size: 1.2rem; font-weight: bold; margin: 30px 0 12px; padding: 8px 12px;
  background-color: #2c2c2c; border-left: 10px solid #FCCE00; color: #FFF;
}

/* === Alternate Versions Links === */
.alternate-versions { margin: 8px 0; padding-left: 4px; }
.alternate-versions strong {
  display: block; font-size: 1rem; color: #444; margin-bottom: 4px; font-weight: bold;
}
.alternate-versions a {
  display: block; font-weight: bold; color: #008000; text-decoration: none; margin-bottom: 3px;
}
.alternate-versions a:hover { text-decoration: underline; }

.play-icon { font-size: 0.8rem; margin-right: 6px; color: #000; display: inline-block; position: relative; top: -2px; }

.global-game-entry {
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #ccc; font-size: 1rem;
}

.season-divider {
  font-weight: bold; font-size: 1.2rem; margin: 20px 0 10px 0; border-top: 2px solid #000; padding-top: 8px;
}

.game-title-line { font-weight: bold; color: #000; }
.global-game-title { color: #000; font-weight: bold; text-decoration: none; }
.global-game-score { margin-left: 6px; font-weight: normal; color: #000; }
.alt-version { margin-left: 20px; }
.alt-link { color: #008000; font-weight: bold; text-decoration: none; }

/* === Radio Only Button === */
.radio-only-button {
  display: inline-block; background-color: #1e1e1e; color: #FCCE00; padding: 8px 16px;
  font-weight: bold; text-decoration: none; border-radius: 4px; display: inline-block; font-size: 0.95rem;
  transition: background-color 0.3s ease;
}
.radio-only-button:hover { background-color: #333; color: #fff200; }

.game-section-divider.green-divider {
  background-color: #005e00 !important; color: #fff; border-left: 10px solid #005e00 !important;
  padding: 5px 8px; font-weight: bold; font-size: 1.1rem; margin: 30px 0 12px;
}

/* === Season Summary (unified) === */
.season-summary {
  margin: 20px 0; font-size: 1.1rem; line-height: 1.4; color: #111;
}

/* Image: desktop/tablet floats right; mobile full width at top */
.wrap-image-desktop {
  float: right; width: 250px; height: auto; margin: 10px 3px 12px 20px;
  border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); display: block;
}

/* Desktop: fully open; hide both toggles */
@media (min-width: 769px) {
  .season-summary .extra-summary { display: block; }
  .season-toggle-more, .season-toggle-less { display: none !important; }
}

/* Mobile: collapsed by default; inline "Read More..." after p2; bottom "Show Less..." when expanded */
@media (max-width: 768px) {
  .season-summary .extra-summary { display: none; }
  .season-summary.expanded .extra-summary { display: block; }

  .season-toggle-more { 
    display: block;      /* CHANGED from inline to block */
    margin-top: 10px;    /* adds spacing like Show Less */
  }
  .season-summary.expanded .season-toggle-more { display: none; }

  .season-toggle-less { display: none; }
  .season-summary.expanded .season-toggle-less { display: inline; }

  .wrap-image-desktop {
    float: none; width: 100%; height: auto; margin: 0 0 12px 0;
  }
}
/* Collapse on ALL viewports when opted-in */
.season-summary.collapsible-all .extra-summary { display: none; }
.season-summary.collapsible-all.expanded .extra-summary { display: block; }

.season-summary.collapsible-all .season-toggle-more { display: inline; }
.season-summary.collapsible-all.expanded .season-toggle-more { display: none; }

.season-summary.collapsible-all .season-toggle-less { display: none; }
.season-summary.collapsible-all.expanded .season-toggle-less { display: inline; }

/* === Opt-in: collapse on ALL viewports for long summaries === */
.season-summary.collapsible-all .extra-summary { display: none !important; }
.season-summary.collapsible-all.expanded .extra-summary { display: block !important; }

.season-summary.collapsible-all .season-toggle-more { display: inline !important; }
.season-summary.collapsible-all.expanded .season-toggle-more { display: none !important; }

.season-summary.collapsible-all .season-toggle-less { display: none !important; }
.season-summary.collapsible-all.expanded .season-toggle-less { display: inline !important; }
