/* General styles */
body {
    font-family: 'Consolas', monospace;
    margin: 0;
    padding: 20px; /* Add padding to the body */
    background-color: #f4f4f4;
}

.wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header nav {
    display: flex;
    align-items: center;
}

.header nav .btn-submit {
    text-decoration: none;
    margin: 0;
}

.main-content {
    display: flex;
    width: 100%;
}

h1, h2 {
    font-family: Arial, sans-serif;
    color: #333;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Sidebar styles */
.sidebar {
    width: 15%;
    padding: 20px;
    border: 1px solid #000; /* Change border color to black */
    background-color: transparent; /* Remove white background */
}

.sidebar h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.sidebar form {
    display: flex;
    flex-direction: column;
}

.sidebar label {
    margin-bottom: 5px;
}

.sidebar input[type="radio"] {
    margin-right: 5px;
}

.sidebar button {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    cursor: pointer;
    font-family: 'Consolas', monospace;
}

.sidebar button:hover {
    background-color: #000;
    color: #fff;
}

/* Content styles */
.content {
    flex: 1;
    padding: 20px;
}

.content h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.content table {
    width: auto;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.content table, .content th, .content td {
    border: 1px solid #ddd;
}

.content th, .content td {
    padding: 2px;
    text-align: left;
}

.content th {
    background-color: #f4f4f4;
}

.content tr:nth-child(even) {
    background-color: #f9f9f9;
}

.content tr:hover {
    background-color: #f1f1f1;
}

/* Table column widths */
.content .col-datetime {
    width: 5em;
}

.content .col-match-id {
    width: 15em;
}

.content .col-opponent {
    width: 5em;
    text-align: center;
}

.content td.col-opponent {
    background-size: cover;
    background-position: center;
    color: white;
    text-shadow: 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black;
    text-align: center;
}

.content .col-map-id {
    width: 6em;
}

.content td.col-map-id {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; 
    background-size: cover;
    background-position: center;
    color: white !important; 
    text-shadow: 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black;
    text-align: center;
}

.content .col-final-score {
    width: 10em;
    /* text-align: center; */
}

.content .col-epm-mult {
    width: 7em;
    text-align: center;
}

.content .col-kills-vs-pp {
    width: 7em;
}

.content .col-final-score .bar-chart {
    position: relative;
    width: 100%;
    height: 20px;
    background-color: rgba(220, 50, 32, 0.8);
    display: inline-block;
    border-radius: 5px;
}

.content .col-final-score .bar-chart .team-score {
    position: relative;
    height: 100%;
    background-color: rgba(0, 90, 181, 0.8);
    border-radius: 5px;
}

.content .col-final-score .bar-chart .score-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.9em;
    padding: 0 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.content .col-final-score .bar-chart .team-score-text {
    left: 2px;
}

.content .col-player-tag {
    width: 10em;
}

.content .col-kills {
    width: 5em;
    text-align: center;
}

.content .col-deaths {
    width: 5em;
    text-align: center;
}

.content .col-pp-kill-line {
    width: 10em;
    text-align: center;
}

.content .col-wins {
    width: 5em;
    text-align: center;
}

.content .col-bookmaker-map-line {
    width: 10em;
    text-align: center;
}

/* Clearfix for floats */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Additional styles from inline CSS */
.pp-updates-box {
    position: relative; /* Add this line */
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 2em;
    background-color: #f9f9f9;
}

.pp-updates-refresh {
    text-align: right;
    font-size: 0.4em;
    color: #666;
}

.horizontal-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.pp-updates-container {
    width: 25%;
    padding: 0px;
}

.summary-container {
    width: 55%;
    padding: 0px;
}

.summary-box-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.summary-box {
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.summary-box-title {
    font-family: Arial, sans-serif;
    font-size: 0.9em;
    font-style: italic;
    flex: 1; /* Add this line */
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-text {
    font-size: 1.5em;
    flex: 1; /* Add this line */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit {
    /* margin-top: 10px; */
    padding: 10px;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    cursor: pointer;
    font-family: 'Consolas', monospace;
}

.btn-submit:hover {
    background-color: #000;
    color: #fff;
}

.pp-updates-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.5em;
    cursor: pointer;
}

/* Header controls styles */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#header-search-form {
    display: flex;
    align-items: center;
    margin: 0;
}

#header-search-form input[type="text"] {
    padding: 5px 10px;
    border: 1px solid #000;
    font-family: 'Consolas', monospace;
    width: 200px;
}

#header-search-form .btn-submit {
    margin: 0;
    margin-left: 5px;
}

.header-controls form {
    display: flex;
    align-items: center;
    margin: 0;
}

#med-kills-overall {
    font-size: 1.5em;
    text-align: center;
    margin-top: 10px;
}

/* Tooltip styles */
.has-tooltip {
    position: relative;
    cursor: help;
}

.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    margin-bottom: 5px; /* Add some space between the tooltip and the element */
}

.has-tooltip:hover::after {
    visibility: visible;
    opacity: 1;
}

/* Odds Slider Styles */
.odds-slider-container {
    padding: 10px;
    margin-top: 10px;
}

.odds-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #666;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 2px;
    background: #ddd;
}

.odds-slider {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    height: 0px;
    background: none;
}

.odds-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #005AB5;
    cursor: pointer;
    border: 1px solid #fff;
}

.odds-slider::-moz-range-thumb {
    pointer-events: auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #005AB5;
    cursor: pointer;
    border: 1px solid #fff;
}

slider-wrapper .odds-slider:first-child {
    z-index: 2;
}

slider-wrapper .odds-slider:nth-child(2) {
    background: #005AB5;
}

.odds-include-na {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.odds-include-na label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.odds-include-na input[type="checkbox"] {
    cursor: pointer;
}

input[type="radio"]:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Home page table styles */
#player-stats-table .col-player {
    width: 10em;
    font-weight: bold;  /* Add bold for player names */
}

#player-stats-table .col-team {
    width: 5em;
    text-align: center;
}

#player-stats-table tbody .col-team {  /* Separate style for body cells only */
    background-size: cover;
    background-position: center;
    color: white;
    text-shadow: 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black;
}

#player-stats-table .col-start-time {
    width: 10em;
}

#player-stats-table .col-line-score,
#player-stats-table .col-median-kills {
    width: 5em;
    text-align: center;
}

#player-stats-table .col-map-odds {
    width: 10em;
    text-align: center;
}

#player-stats-table .col-action {
    width: 3em;
    text-align: center;
}

#player-stats-table .col-link {
    width: 1em;
    text-align: center;
    cursor: pointer;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: color 0.2s ease;
    color: #666;
}

#player-stats-table .col-link:hover {
    color: #000000;
}

#player-stats-table th.col-link {
    width: 4em;  /* Wider to accommodate text */
    text-align: left;  /* Left align like other headers */
    background-color: #f4f4f4;
    font-family: inherit;  /* Use default font for header */
    font-weight: bold;
    color: inherit;
    cursor: default;
}

#player-stats-table td.col-link {
    width: 1em;
    text-align: center;
    cursor: pointer;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: color 0.2s ease;
    color: #666;
}

#player-stats-table td.col-link:hover {
    color: #000000;
}

/* Layout adjustments for sidebar */
main {
    display: flex;
    gap: 20px;
}

/* Table adjustments */
.stats-container {
    overflow-x: auto;
}

#game-details-table {
    width: 90%;  /* Allow table to size based on content */
    /* min-width: 80%; */
    table-layout: auto;
}

#game-details-table th,
#game-details-table td {
    /* padding: 8px 12px; */
    border: 1px solid #ddd;
}

#game-details-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    text-align: left;
}

#game-details-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#game-details-table tr:hover {
    background-color: #f5f5f5;
}

/* Game details table specific styles */
#game-details-table .col-link {
    width: 1em;
    text-align: center;
    cursor: pointer;
    /* font-family: "Font Awesome 6 Free"; */
    font-weight: 900;
    transition: color 0.2s ease;
    color: #666;
}

#game-details-table .col-link:hover {
    color: #000000;
}

#game-details-table th.col-link {
    width: 4em;  /* Wider to accommodate text */
    text-align: left;  /* Left align like other headers */
    background-color: #f4f4f4;
    font-family: inherit;  /* Use default font for header */
    font-weight: bold;
    color: inherit;
    cursor: default;
}

#game-details-table td.col-link {
    width: 1em;
    text-align: center;
    cursor: pointer;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: color 0.2s ease;
    color: #666;
}

#game-details-table td.col-link:hover {
    color: #000000;
}

#game-details-table .col-player {
    width: 6em;
    white-space: nowrap;
    color: inherit;  /* Remove link color */
    text-decoration: none;  /* Remove underline */
    cursor: default;  /* Remove pointer cursor */
}

#game-details-table .col-team {
    width: 4em;
    text-align: center;
}

#game-details-table .col-line-score {
    width: 6em;
    text-align: center;
    font-weight: bold;
}

#game-details-table .col-map-stats {
    width: 7em;
    text-align: center;
    padding: 4px 8px;
}

#game-details-table td.col-map-stats {
    text-align: center;
    line-height: 1.4;
}

#game-details-table .games-count {
    font-size: 0.85em;
    color: #666;
}

#game-details-table td.col-team {
    background-size: cover;
    background-position: center;
    color: white;
    text-shadow: 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black,
                 0 0 5px black,0 0 5px black;
}

/* Header tooltips */
#game-details-table th.has-tooltip {
    position: relative;
}

#game-details-table th.col-map-stats {
    background-color: #f0f0f0;
    border-bottom: 2px solid #ddd;
}

/* Time formatting */
.datetime {
    white-space: nowrap;
}
