/* ============================================================== 
   Base Styles 
   ============================================================== */
body {
  font-family: 'Lexend', sans-serif;
  background: #121212;
  color: #e0e0e0;
  margin: 0;
  padding: 20px;
}

h1 {
  font-family: 'Lexend', sans-serif;
  text-align: center;
  margin-bottom: 30px;
}

/* ============================================================== 
   Navbar / Day Navigation 
   ============================================================== */
.sticky-text {
  position: sticky;
  top: 0px;
  background-color: #2c1a4d;
  color: #fff;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 8px 10px;
  gap: 6px;
  z-index: 2000;
  scrollbar-width: thin;
}

.navbar {
  position: sticky;
  top: 30px;
  background-color: #2c1a4d;
  color: #fff;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 8px 10px;
  gap: 6px;
  z-index: 1000;
  scrollbar-width: thin;
}

.navbar::-webkit-scrollbar {
  height: 6px;
}

.navbar::-webkit-scrollbar-thumb {
  background-color: #633fa0;
  border-radius: 3px;
}

.nav-day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 70px;
  padding: 6px 10px;
  background-color: #4b2d7d;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
  text-align: center;
}

.nav-day-btn:hover {
  background-color: #633fa0;
}

.nav-day-btn.active {
  background-color: #e8e8e8;
  color: #000;
}

/* ============================================================== 
   Day Block 
   ============================================================== */
.day-block {
  background: #1e1e1e;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.day-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: 2px solid #333;
  padding-bottom: 5px;
  color: #ffffff;
}

/* ============================================================== 
   Show Group / Header 
   ============================================================== */
.show-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
}

.show-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  max-width: fit-content;
  margin: 0 auto;
}

/* ---------- LOGO ---------- */
.show-logo-container {
  width: 120px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* anchor wrapper for logo */
.show-logo-link {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.show-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

/* ---------- SHOW INFO ---------- */
.show-info-link {
  flex: 1;
  height: 100%;
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.show-info {
  text-align: center;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hover affordance */
.show-logo-link:hover,
.show-info-link:hover {
  filter: brightness(1.1);
}

.show-time {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font-size: 2rem;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
}

.show-subtitle {
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 2px;
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .show-header {
    max-width: 90vw;
    height: auto;
    gap: 10px;
  }

  .show-logo-container {
    width: 60px;
    height: 60px;
  }

  .show-time {
    font-size: 1.5rem;
  }

  .show-subtitle {
    font-size: 0.8rem;
  }
}

/* ============================================================== 
   Run Header Row 
   ============================================================== */
.run-header-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  font-weight: bold;
  border-bottom: 1px solid #555;
  padding: 8px 0;
  background-color: #1e1e1e;
  position: sticky;
  top: 0;
  z-index: 500;
}

/* ============================================================== 
   Run Row 
   ============================================================== */
.run-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  align-items: center;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
  background-color: #1a1a1a;
  transition: background-color 0.2s;
}

.run-row:hover {
  background-color: #2e2e2e;
}

.game {
  font-size: 22px;
  font-weight: bold;
}

.category {
  font-size: 14px;
  color: #aaaaaa;
}

.run-start,
.estimate {
  font-size: 22px;
  font-weight: bold;
}

.runner {
  font-size: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.runner-pill {
  padding: 5px 12px;
  background-color: #7b5ea3;
  color: #ffffff;
  border-radius: 9px;
  text-decoration: none;
}

/* ============================================================== 
   Timezone Bar
   Default: inline at the bottom of the page content.
   When .pinned is added on load, it fixes to the bottom of the
   viewport. Apply button removes .pinned to set it free.
   ============================================================== */
#tz-bar {
  background-color: #2c1a4d;
  border-top: 2px solid #4b2d7d;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Lexend', sans-serif;
  margin-top: 20px;
  transition: border-radius 0.2s;
}

/* Fixed to viewport bottom until Apply is pressed */
#tz-bar.pinned {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0;
  z-index: 3000;
}

/* Spacer to prevent content being hidden behind the pinned bar */
#tz-spacer {
  height: 56px;
  display: none; /* shown by JS when bar is pinned */
}

#tz-bar label {
  color: #ccc;
  font-size: 0.9em;
  white-space: nowrap;
}

#tz-select {
  background-color: #1a1a1a;
  color: #ffffff;
  border: 1px solid #633fa0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Lexend', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s;
}

#tz-select:hover,
#tz-select:focus {
  border-color: #9b6fd4;
  outline: none;
}

#tz-refresh {
  background-color: #4b2d7d;
  color: #ffffff;
  border: 1px solid #633fa0;
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  font-family: 'Lexend', sans-serif;
  transition: background-color 0.2s;
  white-space: nowrap;
}

#tz-refresh:hover {
  background-color: #633fa0;
}

#tz-note {
  color: #888;
  font-size: 0.8em;
  white-space: nowrap;
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  #tz-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }

  #tz-note {
    display: none;
  }
}
