:root {
    --f1-red: #e10600;
    --f1-dark: #15151e;
    --f1-darker: #0c0c12;
    --f1-gray: #1f1f2b;
    --f1-light-gray: #2d2d3d;
    --f1-text: #ffffff;
    --f1-text-secondary: #9090a0;
}

body {
    font-family: 'Exo 2', sans-serif;
    overflow: hidden;
    background-color: var(--f1-darker);
}

.container-fluid {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.eng-view-global-data-section {
    flex: 0 0 15%;
    padding: 1rem;
    border-bottom: 1px solid #333;
}

.eng-view-race-table-section {
    flex: 1 1 auto;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}


.eng-view-global-stat {
    display: inline-block;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.eng-view-global-stat label {
    display: block;
    font-size: 0.9rem;
    color: var(--f1-text-secondary);
}

.eng-view-global-stat span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--f1-text);
}

/* Weather table styles */
.eng-view-weather-table {
    font-size: 0.85rem;
    margin: 0;
    height: 100%;
}

.eng-view-weather-table td {
    padding: 0.3rem;
    text-align: center;
    background-color: var(--f1-gray) !important;
    border-color: #333 !important;
    color: var(--f1-text);
}

/* Custom scrollbar for better visibility */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Tyre wear rows */
.eng-view-tyre-row-1 {
    font-size: 0.9rem;
    color: var(--f1-text);
}

.eng-view-tyre-row-2 {
    color: var(--f1-text-secondary);
    font-size: 0.8rem;
}

/* Icon and text row styling */
.eng-view-icon-row {
    display: flex;
    flex-direction: column;
}

.eng-view-icon {
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
}

.eng-view-icon svg {
    width: 0.9rem;
    height: 0.9rem;
}

.eng-view-restricted-cell {
    font-style: italic;
    color: var(--f1-text-secondary);
    background-color: #1a1a1a;
}

.telemetry-restricted-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* Race status section layout */
.card-body .eng-view-global-stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
}

.global-stats-section-header {
    background: var(--f1-dark);
    color: var(--f1-text);
}

.global-stats-section {
    background: var(--f1-dark);
}

/* Prediction lap input styling */
#predictionLap {
    width: 80px;
    height: 30px;
    padding: 0.25rem 0.5rem;
}

/* Dark theme for number input */
input[type="number"] {
    background-color: #111 !important;
    color: var(--f1-text) !important;
    border-color: #333 !important;
}

input[type="number"]:focus {
    background-color: #222 !important;
    color: var(--f1-text) !important;
    border-color: #444 !important;
    box-shadow: 0 0 0 0.2rem rgba(66, 70, 73, 0.5) !important;
}

/* Remove number input spinners in Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    background: #222;
}

.settings-button {
  background: none;
  border: none;
  color: var(--f1-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.settings-button:hover {
  color: var(--f1-red);
}

/* Player row highlight */

.green-time {
    display: inline-block;
    color: var(--bs-success) !important;
    border: 2px solid currentColor !important;
    border-radius: 4px !important;
}

.purple-time {
    display: inline-block;
    color: #d825d8 !important;
    border: 2px solid currentColor !important;
    border-radius: 4px !important;
}

.red-time {
    display: inline-block;
    color: var(--bs-danger) !important;
    border: 2px solid currentColor !important;
    border-radius: 4px !important;
}

.drs-not-available {
    display: inline-block;
    color: #2D2D33;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.drs-available {
    display: inline-block;
    color: #A1A1AA;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.drs-active {
    display: inline-block;
    color: #10B981;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.driver-pitting {
    display: inline-block;
    color: #06B6D4;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.ag-header-cell-text {
    text-align: center;
}

.ag-header-group-cell-label .ag-header-cell-text {
    text-align: center;
}

.player-row {
    border: 2px solid #ffd700 !important;
}

/* Column Visibility Pane */
.column-visibility-pane {
    position: fixed;
    top: 0;
    right: -300px; /* Start off-screen to the right */
    width: 300px;
    height: 100%;
    background-color: var(--f1-dark);
    border-left: 1px solid var(--f1-light-gray);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    color: var(--f1-text);
}

.column-visibility-pane.open {
    right: 0; /* Slide in */
}

.column-visibility-pane .pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--f1-darker);
    border-bottom: 1px solid var(--f1-light-gray);
}

.column-visibility-pane .pane-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--f1-text);
}

.column-visibility-pane .pane-body {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
}

#column-visibility-container {
    display: flex;
    flex-direction: column;
}

#column-visibility-container label {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

#column-visibility-container input[type="checkbox"] {
    margin-right: 0.5rem;
}

.column-group-children {
    margin-left: 20px; /* Indent the container for children */
    border-left: 1px solid var(--f1-light-gray); /* Optional: visual indicator for children */
    padding-left: 10px;
}

.column-toggle {
    margin-bottom: 0.5rem;
}

.ag-overlay-no-rows-center {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    font-size: 1.2rem;
    color: var(--f1-text);
    text-align: center;
    flex-direction: column;
}

.driver-view-link {
    color: var(--f1-red);
    text-decoration: underline;
    cursor: pointer;
}

.driver-view-link:hover {
    color: #ff4d4d; /* Lighter red on hover */
}

.inactive .nav-link {
  color: var(--f1-text-secondary);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background-color: #333; /* Dark background */
  color: #fff; /* White text */
  border-radius: 20px; /* Rounded corners */
  padding: 10px 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); /* Subtle shadow for better visibility */
}

.toast-body {
  font-size: 16px; /* Standard font size */
  text-align: center; /* Centered text */
}
