/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.bracket {
    justify-content: space-between;
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: no-wrap;
    padding: 20px;
    overflow-x: auto;
}

.round {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 10px;
    width: 200px;
    justify-content: space-around;
}

.round-title {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #444;
}

.match {
    border: 1px solid #333;
    padding: 10px;
    position: relative;
    text-align: center;
    margin: 10px 0;
    background: #f8f9fa;
    width: 240px;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.team {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    padding: 5px;
    background: #fff;
    border-radius: 5px;
    transition: 0.3s ease-in-out;

}

.team.winner {
    background: mediumseagreen; /* Green for winners */
    color: white;
}
.team.winner a {
    color: white;
    text-decoration: none;
}

.team.loser {
    background: tomato; /* Red for losers */
    color: white;
}
.team.loser a {
    color: white;
    text-decoration: none;
}

.score {
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    color: #007bff;
}

.vs {
    font-size: 14px;
    color: gray;
    margin: 5px 0;
}

.match-details {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
}

.time, .location {
    display: flex;
    align-items: center;
    gap: 5px;
}

/*.match::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: #000;
    right: -40px; 
    top: 50%;
}

.match::before {
    content: "";
    position: absolute;
    width: 2px;
    height: 50px; 
    background-color: #000;
    right: -40px; 
    top: 25%;
}
*/
/* LAST ROUND (No line after finals) */
.round:last-child .match::after {
    display: none;
}

.round:last-child .match::before {
    display: none;
}

/* Header Styles */
header {
    background-color: #343a40;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 5px 0 0;
    font-size: 1.2rem;
}

.key {
    padding:20px;
}
.logo {
    max-width: 50px;
}
/* Navbar Styles */
/* Navbar */
.navbar {
    background-color: maroon!important;
    margin-bottom: 20px;
}

.navbar .nav-link {
    color: #fafafa !important;
}

.navbar .nav-link:hover {
    color: gold !important;
}

.navbar .navbar-brand {
    font-weight: bold;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.spacer {
    height: 75px;
}
#hero {
    max-width:100%;
}
.team-header {
    display: flex;
    flex-flow: wrap;
    justify-content: space-between;
}

/* Cards (for teams, matches, etc.) */
.card {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: scale(1.03);
}

.card-header {
    background-color: #343a40;
    color: white;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background-color: #f8f9fa;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
}

/* Button Styles */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #4e555b;
}

/* Form Elements */
.form-control {
    border-radius: 5px;
    padding: 10px;
    border: 1px solid #ced4da;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Table Styling */
.table {
    margin: 0 !important;
    width: 100%;
    margin-bottom: 1rem;
    background-color: #fff;
}


/* Ensure the table container allows scrolling */
.dataTables_wrapper {
    overflow-x: auto;
}

/* Make sure the table is wide enough */
table.dataTable {
    width: 100%;
}
.table th, .table td {
    text-align: center;
    /*padding: 12px;*/
}

.table thead th {
    background-color: gold !important;
    color: white;
}

.table td {
    background-color: #f8f9fa;
}

.table td, .table th {
    vertical-align: middle;
    text-align: left;
}

.table .team-success {
    font-weight: bold;
}
.score-table {
    text-align: left;
}

.winpercentage-cards {
    display: flex;
    flex-flow: wrap;
}
.winpercentage-card {
    border: 2px solid;
    border-radius: 8px;
    padding: 10px;
    margin: 10px;
    max-width: 200px;
}
.winpercentage-header {
    
}
/* Performance Chart */
#statCard {
    max-width: 200px;
    min-width: 128px;
}

#performanceChart {
    max-width: 100%;
    height: 300px;
}

#record {
    border: 1px solid #ccc;
    background: linear-gradient(to bottom right, #f4f4f4, #e8e8e8);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-collapse: collapse;
    table-layout: auto;
    margin: 20px auto;
}

#record tr {
    background-color #f2f2f2;
    border-radius: 10px;
}

#record th {
    padding-top: 2px;
    padding-bottom: 2px;
    text-align: center;
    background-color: #f2f2f2;
    color: gray;
    border-right: 1px solid #ababab;
}

#record td {
    padding: 2px 20px;
    text-align: center;
    font-size:1.3rem;
    font-weight: bold;
    background-color: #f2f2f2;
    color: red;
    border-right: 1px solid #ababab;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
  gap: 10px;
}
.tabs a {
  padding: 10px 15px;
  text-decoration: none;
  color: teal;
  border: 1px solid teal;
  border-radius: 5px;
}
.tabs a.active {
    background-color: teal;
  color: white;
}

/* Style for the card */
.next-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: linear-gradient(to bottom right, #f4f4f4, #e8e8e8);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto 20px;
    padding: 20px;
    max-width: 700px;
    text-align: center;
}

/* Date and Time */
.match-date-time p {
    font-size: 1.2rem;
    color: #333;
    margin: 2px 0;
}

/* Team matchup section */
.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Team information section */
.team-info {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    margin: 0 20px;
}

/* Team logo */
.team-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Team name */
.team-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fafafa;
    background-color: black;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    width: 250px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4rem;
    text-decoration: none;
    display: inline-block;
}

/* Style for the card */
.next-game-card-mini {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    text-align: left;
}

/* Team logo */
.next-game-card-mini img {
    max-width: 30px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Team name */
.team-name-mini {
    font-size: .6rem;
    font-weight: bold;
    color: #fafafa;
    background-color: black;
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
    max-width: 150px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4rem;
    text-decoration: none;
    display: inline-block;
}

/* VS text */
.vs {
    font-size: 1.5rem;
    font-weight: bold;
    color: #444;
    margin: 0 15px;
}

/* Location section */
.match-location {
    font-size: 1rem;
    color: #555;
}

.match-location p {
    margin: 5px 0;
}

/* Recent Games List */
.recent-games-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-game-item {
    margin-bottom: 15px;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: linear-gradient(to bottom right, #f4f4f4, #e8e8e8);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto 20px;

}

/* Game Details */
.game-details {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

/* Team Names and Results */
.game-result {
    font-size: 16px;
    line-height: 1.5;
}

.team-name-game-list {
    font-weight: bold;
    text-decoration: none;
    padding: 2px 5px;
    border-radius: 5px;
    color: #fff;
}

.win {
    color: #4caf50; /* Green for winners */
}

.loss {
    color: #f44336; /* Red for losers */
}
.team-name-game-list.winner {
    background-color: #4caf50; /* Green for winners */
}

.team-name-game-list.loser {
    background-color: #f44336; /* Red for losers */
}

.team-name-game-list.tie {
    background-color: #585858; /* Blue for ties */
}

.status {
    color: #f44336;
}

/* Score */
.score {
    font-weight: bold;
    color: #333;
    margin-left: 5px;
}

/* Location */
.game-location {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.division-group {
  margin-bottom: 30px;
}

.division-group h4 {
  font-size: 1.2rem;
  color: #007bff;
  margin-bottom: 5px;
}

.game-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.game-card img {
    max-width: 30px;
}

.sponsor-banner {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sponsor-logo {
    max-height: 150px;
    width: auto;
}

.sidebar .card {
    border: 1px solid #ddd;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar .card-header {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

.sidebar img {
    max-width: 100%;
    height: auto;
}


/* Footer */
footer {
    background-color: maroon;
    color: white;
    padding: 15px 0;
    text-align: center;
    width: 100%;
    bottom: 0;
}

/* Rink Address Tooltip*/
.rink-tooltip {
  position: relative;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.rink-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%; /* Position above the text */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out;
  z-index: 10;
}

.rink-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap; /* Allows items to wrap onto new lines */
        padding: 10px 0; /* Adds padding for smaller devices */
    }

    .navbar a {
        padding: 8px 10px; /* Adjust link padding for smaller screens */
        font-size: 14px; /* Reduce font size */
    }
    .container {
        padding: 0 10px;
	margin: auto;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    .card-body {
        padding: 15px;
    }

    .card-header {
        font-size: 1.2rem;
    }

    .winpercentage-cards {
	justify-content: space-between;
    }

    .winpercentage-card {
	margin: 5px 0;
	max-width: 49%;
    }
    
    #record td {
	padding: 2px;
	text-align: center;
	font-size:1rem;
	font-weight: bold;
	color: red;
    }
    .tabs {
	font-size: .7rem;
    }

    /* Mobile and Tablet Responsiveness */
@media (max-width: 768px) {
  .next-game-card-mini {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-date-time-mini {
    justify-content: flex-start;
    font-size: 0.9rem;
  }

  .match-date-time-mini img {
    max-width: 30px;
    margin-right: 8px;
  }

  .match-date-time-mini span {
    margin: 5px 0;
  }
}
}

@media (max-width: 576px) {
    .card {
        margin-bottom: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }
}

#winPercentage {
    font-weight: bold;
    color: #333;
}
