/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/

.events-body .container {
  padding-bottom: 50px;
}

.timetable-page .timetable-events .single-event {
  width: 100%;
  margin: 10px 0 5px 0;
  padding: 16px;
  text-align: left;
  background: #153c30;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

div.single-event div.time {
  color: #ffffff;
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
}

div.header-intro {
  background: #111827 !important;
}

/* New grid layout for event */
.event-grid {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.event-col {
  display: flex;
  align-items: center;
}
.event-col--meta {
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 200px;
}
.event-col--teams {
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1 1 auto;
}
.event-col--tickets {
  justify-content: flex-end;
  flex: 0 0 100px;
  margin-left: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-size: 12px;
}
.badge--category {
  color: #fff;
  height: 20px;
}

.badge--separator {
    color: #fff;
    font-size: 12px;
}

.event-datetime {
  line-height: 20px;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.event-date {
  line-height: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.event-time {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.team {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  flex: 0 0 220px;
  min-width: 0;
}
.event-col--teams .team--home {
  justify-content: flex-end;
}
.event-col--teams .team--away {
  justify-content: flex-start;
}
.team-logo {
  width: 56px;
  flex: 0 0 56px;
  display: flex;
  justify-content: center;
}
.team-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  max-width: 50px;
  display: flex;
  align-items: center;
}
.team-name {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  max-width: calc(100% - 56px - 8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  background: transparent !important;
}
.event-col--teams .score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  min-width: 116px;
  flex: 0 0 116px;
}

/* Split score boxes for results */
.score--split {
  background: transparent;
  padding: 0;
  gap: 10px;
}
.score--split .score-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.tickets-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #ffffff;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}
.tickets-button:hover {
  background: #1a3a2d;
  color: #c7ead9;
  border-color: #3b6b52;
}

div.single-event div.title .clock-time {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0px;
  width: 80px;
  height: 32px;
  flex: none;
  order: 0;
  flex-grow: 0;
  margin: 0 5px 0 5px;
}

div.single-event div.title .team_home_name,
div.single-event div.title .team_away_name {
  display: block;
  flex-direction: row;
  align-items: center;
  padding: 0px;
  width: 350px;
  flex: none;
  order: 0;
  flex-grow: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 350px;
  white-space: nowrap;
  margin: 0 5px 0 5px;
}

div.single-event div.title .team_home_name {
  text-align: right;
}

div.single-event div.title .team_away_name {
  text-align: left;
}

div.single-event div.title .team_home_logo_container .team_home_logo,
div.single-event div.title .team_away_logo_container .team_away_logo {
  width: 56px;
  height: 56px;
  margin: 0 5px 0 5px;
}

div.single-event div.title .clock-time {
  font-style: normal;
  font-weight: 400;
  font-size: 32px;
  color: #fff;
}

div.single-event div.title .team_home_name,
div.single-event div.title .team_away_name {
  color: #fff;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
}

/* Remove legacy white backgrounds */
div.single-event div.league,
div.single-event div.team {
  background-color: transparent;
  color: #fff;
}

div.single-event div.team {
  width: fit-content;
  padding: 0 5px 0 5px;
}

.league-list .league-list_item,
.team-list .team-list_item {
  font-size: 14px;
  background-color: #0f1f1a;
  color: #fff;
  font-weight: 600;
  margin-right: 5px;
  padding: 2px 16px 2px 16px;
  border-radius: 6px;
  border: 1px solid #000000;
}

.league-list_item.active,
.team-list_item.active {
  background-color: #006a44;
}

.event-filters {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px 0 20px 0;
}

/* Place league and season controls in one row */
.event-filters .league-list,
.event-filters .season-list {
  flex-wrap: wrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

/* Ensure Select2 doesn’t expand full width */
.event-filters .select2 {
  min-width: 200px;
  width: auto !important;
}

.league-list,
.team-list,
.filter-title {
  display: inherit;
  padding-top: 10px;
}

.league-list {
  margin-right: 20px;
}

.team-list {
  margin-right: 5px;
  color: #fff;
  font-size: 14px;
}

.filter-title {
  font-style: normal;
  font-weight: 700;
  margin-right: 5px;
  font-size: 14px;
}

.event-filters .select2 {
  font-size: 14px;
  min-width: 200px;
  width: auto !important;
}

.select2-container--default .select2-selection--single {
  font-size: 14px !important;
  background-color: #0f1f1a !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #fff !important;
}

.select2-selection__rendered {
  line-height: 31px !important;
}

.select2-container .select2-selection--single {
  height: 35px !important;
}

.select2-selection__arrow {
  height: 34px !important;
}

.select2-container--default .select2-results__option--selected {
  background-color: #006a44 !important;
}

.select2-container--default .select2-selection--single {
  border-color: #0f1f1a !important;
}

.select2-dropdown {
  background-color: #0f1f1a !important;
  font-size: 14px !important;
  color: #fff !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: #0f1f1a !important;
}

.select2-search__field {
  font-size: 14px !important;
  color: #fff !important;
}

.events-body {
  background-repeat: no-repeat;
  background-position-x: right;
  background-size: 900px;
  min-height: 550px;
}

/* Loading overlay */
.events-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  z-index: 5;
}
.events-body .container {
  position: relative;
}
.events-loading .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.row,
div.clear {
  padding-bottom: 0px !important;
}

.current-events-month .current-month {
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  overflow: hidden;
  padding: 24px 0;
}

div.single-event div.footer-info {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex: none;
  order: 1;
  flex-grow: 0;
  z-index: 1;
}

div.single-event div.footer-info .league {
  flex-direction: row;
  align-items: center;
  padding: 2px 0 2px 0;
  margin: 0 5px 0 5px;
  width: 100px;
  flex: none;
  order: 0;
  flex-grow: 0;
}

div.single-event div.footer-info .live-broadcast {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0 5px 0 5px;
  width: 100px;
  height: 32px;
  flex: none;
  order: 0;
  flex-grow: 0;
  padding-left: 9px;
  border: 1px solid red;
  border-radius: 5px;
}

div.single-event div.footer-info .live-broadcast .live-url {
  color: red;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  overflow: hidden;
  text-align: center;
}

div.single-event div.footer-info .live-broadcast .live-broadcast-dot {
  height: 5px;
  width: 5px;
  background-color: red;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

@media only screen and (max-width: 1800px) {
  .events-body {
    background-size: 850px;
  }
}

@media only screen and (max-width: 1500px) {
  .events-body {
    background-size: 600px;
  }
}

@media only screen and (max-width: 1200px) {
  .events-body {
    background-size: 450px;
  }
}

@media only screen and (max-width: 900px) {
  .event-col--tickets {
    flex: 0 0 10px;
  }
  .event-col--meta {
    flex: 0 0 10px;
  }
}

@media only screen and (max-width: 900px) {
  .event-grid {
    flex-direction: column;
    align-items: stretch;
    row-gap: 12px;
  }
  /* Reset fixed bases from desktop to avoid tall items when stacked */
  .event-col--teams .team {
    flex: 0 1 auto;
    width: 100%;
  }
  .event-col--teams .score {
    flex: 0 0 auto;
    min-width: 0;
  }
  .team-logo {
    width: 40px;
    flex: 0 0 40px;
  }
  .event-col--tickets {
    justify-content: flex-start;
    margin-left: 0;
  }
  div.single-event div.league,
  div.single-event div.team {
    flex-direction: column-reverse;
  }
  /* Stack teams and score vertically on mobile */
  .event-col--teams {
    flex-direction: column-reverse;
    align-items: center;
    gap: 8px;
  }
  .event-col--teams .team {
    justify-content: center;
  }
  .event-col--teams .team-name {
    text-align: center;
    max-width: 100%;
    white-space: normal;
  }
  .event-col--teams .score {
    margin: 4px 0;
  }
  .team-logo img {
    height: 32px;
  }
}

@media only screen and (max-width: 900px) {
  .events-body {
    background-size: 360px;
  }
}

@media only screen and (max-width: 692px) {
  div.single-event div.title .team_home_name,
  div.single-event div.title .team_away_name {
    width: 60px;
    max-width: 60px;
  }
}

@media only screen and (max-width: 600px) {
  .events-body {
    background-size: 250px;
  }
}

@media only screen and (max-width: 700px) {
  .events-body {
    padding: 0 20px 0 20px;
  }

  .league-list_item {
    padding: 2px 10px 2px 10px !important;
    display: inherit;
  }
}

@media only screen and (max-width: 480px) {
  div.single-event div.title .team_home_name {
    width: 30px;
    max-width: 30px;
    text-overflow: clip;
  }

  div.single-event div.title .team_away_name {
    width: 30px;
    max-width: 30px;
    text-overflow: clip;
  }

  div.single-event div.title .team_home_name {
    margin-left: 10px;
  }

  div.single-event div.title .team_away_name {
    margin-right: 10px;
  }
}

@media only screen and (max-width: 250px) {
  .events-body {
    background-size: 180px;
  }
}
