@font-face {
    font-family: 'Google Sans';
    src: url('../fonts/GoogleSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Google Sans';
    src: url('../fonts/GoogleSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Google Sans';
    src: url('../fonts/GoogleSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    font-family: 'Google Sans', sans-serif;
}

h4 {
    font-size: 1.0rem;
}

.card-header {
    padding-top: calc(0.5rem + 4px);
    padding-bottom: calc(0.5rem + 4px);
}

.card-header h4,
.card-header h5 {
    font-size: 0.9rem;
    font-weight: 600;
}

.list-group-item h5 {
    font-size: 0.9rem;
    font-weight: 600;
}

main.container {
    margin-top: 20px;
}

.navbar-logo {
    height: 32px;
    width: auto;
}

.navbar-custom {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

@media (min-width: 992px) {
    .main-nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.navbar-nav .nav-link {
    font-weight: 500;
    text-decoration: none;
}

.navbar-nav .nav-link:hover {
    text-decoration: none;
}

/* Override Bootstrap variables for a borderless design */
:root {
    --bs-body-font-size: 0.875rem;
    --bs-card-border-width: 0;
    --bs-list-group-border-width: 0;
    --bs-table-border-width: 0;
}

.card {
    border: none !important; /* Ensure card borders are always removed */
}

/* --- Light Theme --- */
[data-bs-theme="light"] {
    --bs-body-bg: #ffffff;
    --bs-card-bg-custom: #f8f9fa;
    --bs-table-hover-bg-custom: #e9ecef;
    --bs-border-color: #dee2e6;
}
[data-bs-theme="light"] .navbar-custom {
    background-color: var(--bs-card-bg-custom);
}
[data-bs-theme="light"] .card,
[data-bs-theme="light"] .list-group-item {
     background-color: var(--bs-card-bg-custom);
}
[data-bs-theme="light"] .table {
    --bs-table-bg: var(--bs-card-bg-custom);
    --bs-table-hover-bg: var(--bs-table-hover-bg-custom);
    --bs-table-striped-bg: var(--bs-table-hover-bg-custom);
}

.driver-stats-page h2, .race-results-page h2.display-5 {
    font-size: 1.75rem;
}

.driver-stats-page .card-title {
    font-size: 1rem;
}

span.dropped-points {
    opacity: 0.3;
}

/* --- Dark Theme --- */
[data-bs-theme="dark"] {
    --bs-body-bg: #121212;
    --bs-card-bg-custom: #181818;
    --bs-table-hover-bg-custom: #2c2c2c;
    --bs-border-color: var(--bs-body-bg);
}
[data-bs-theme="dark"] .navbar-custom {
    background-color: var(--bs-card-bg-custom);
}
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .list-group-item {
     background-color: var(--bs-card-bg-custom);
}
[data-bs-theme="dark"] .table {
    --bs-table-bg: var(--bs-card-bg-custom);
    --bs-table-hover-bg: var(--bs-table-hover-bg-custom);
    --bs-table-striped-bg: var(--bs-table-hover-bg-custom);
}

[data-bs-theme="dark"] .table-secondary {
    --bs-table-color: #fff;
    --bs-table-bg: #202020;
    --bs-table-border-color: #000;
}

[data-bs-theme="dark"] #bd-theme.btn-link {
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-menu .bi {
    color: #fff;
}

[data-bs-theme="dark"] #bd-theme .bi {
    fill: #fff;
}

/* --- Logo Theme Handling --- */

/* Hide dark logo by default */
.logo-dark {
    display: none;
}
/* Show light logo by default */
.logo-light {
    display: inline-block;
}

/* Show dark logo in dark theme */
[data-bs-theme="dark"] .logo-dark {
    display: inline-block;
}
/* Hide light logo in dark theme */
[data-bs-theme="dark"] .logo-light {
    display: none;
}

/* Handle 'auto' theme based on system preference */
@media (prefers-color-scheme: dark) {
    [data-bs-theme="auto"] .logo-dark {
        display: inline-block;
    }
    [data-bs-theme="auto"] .logo-light {
        display: none;
    }
}

@media (prefers-color-scheme: light) {
    [data-bs-theme="auto"] .logo-dark {
        display: none;
    }
    [data-bs-theme="auto"] .logo-light {
        display: inline-block;
    }
}

@media (max-width: 991.98px) {
    .navbar-logo {
        max-width: 140px;
        height: auto;
    }
}

a.text-reset {
    text-decoration: underline;
}

/* Make all select dropdowns small by default */
.form-select {
    font-size: .875rem;
    padding-top: .25rem;
    padding-bottom: .25rem;
    padding-left: .5rem;
}



.trophy-icon {
    font-size: 2rem;
    line-height: 1;
}
.driver-card-small {
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.driver-card-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.season-group {
    padding-bottom: 2rem;
}
.season-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.season-header {
    text-align: center;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.season-name {
    color: inherit;
    text-decoration: none;
}
