﻿html, body {
    margin: 0;
    padding: 0;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #0f1115;
    color: #e8eaed;
}

body {
    background-color: #0f1115;
    color: #e8eaed;
}

a,
.btn-link {
    color: #7ab8ff;
    text-decoration: none;
}

    a:hover,
    .btn-link:hover {
        color: #a8d1ff;
    }

.content {
    padding-top: 1.1rem;
}

h1, h2, h3, h4, h5, h6 {
    color: #f5f7fa;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

    h1:focus {
        outline: none;
    }

p, span, div, label, li {
    color: #e8eaed;
}

.btn-primary {
    color: #fff;
    background-color: #2f81f7;
    border-color: #2f81f7;
}

    .btn-primary:hover {
        background-color: #1f6fe0;
        border-color: #1f6fe0;
    }

.btn-outline-secondary {
    color: #d0d7de;
    border-color: #4b5563;
    background-color: transparent;
}

    .btn-outline-secondary:hover {
        color: #fff;
        background-color: #2a2f37;
        border-color: #5b6574;
    }

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem rgba(255,255,255,0.06), 0 0 0 0.25rem rgba(47,129,247,0.35);
}

.form-control,
.form-select {
    background-color: #161b22;
    color: #e8eaed;
    border: 1px solid #30363d;
}

    .form-control::placeholder {
        color: #8b949e;
    }

    .form-control:focus,
    .form-select:focus {
        background-color: #161b22;
        color: #fff;
        border-color: #2f81f7;
    }

.form-check-input {
    background-color: #161b22;
    border-color: #4b5563;
}

    .form-check-input:checked {
        background-color: #2f81f7;
        border-color: #2f81f7;
    }

.card,
.modal-content {
    background-color: #161b22;
    border: 1px solid #30363d;
    color: #e8eaed;
    border-radius: 12px;
}

hr {
    border-color: #30363d;
    opacity: 1;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #2ea043;
}

.invalid {
    outline: 1px solid #f85149;
}

.validation-message {
    color: #ff7b72;
}

.blazor-error-boundary {
    background: #b42318;
    color: white;
    padding: 1rem 1rem 1rem 3.7rem;
    border-radius: 10px;
    position: relative;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.darker-border-checkbox.form-check-input {
    border-color: #8b949e;
}

/* TABLES */
.table {
    --bs-table-color: #e8eaed;
    --bs-table-bg: #161b22;
    --bs-table-border-color: #3b434c;
    --bs-table-striped-bg: #1d232c;
    --bs-table-striped-color: #e8eaed;
    --bs-table-hover-bg: #252c36;
    --bs-table-hover-color: #ffffff;
    color: #e8eaed;
    border-color: #3b434c;
    vertical-align: middle;
    margin-bottom: 0;
}

    .table th,
    .table td {
        color: #e8eaed !important;
        background-color: transparent !important;
        border-color: #3b434c !important;
        padding: 0.35rem 0.5rem !important;
    }

    .table thead th {
        color: #ffffff !important;
        font-weight: 600;
        background-color: #11161d !important;
        border-top: 1px solid #5b6574 !important;
        border-bottom: 2px solid #5b6574 !important;
    }

    .table tbody tr {
        background-color: #161b22 !important;
    }

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #1d232c !important;
    color: #e8eaed !important;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #161b22 !important;
    color: #e8eaed !important;
}

.table-hover > tbody > tr:hover > * {
    background-color: #252c36 !important;
    color: #ffffff !important;
}

.table tbody tr:last-child td {
    border-bottom: 2px solid #5b6574 !important;
}

/* table wrappers */
.table-responsive,
.table-wrap {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

    .table-responsive > .table,
    .table-wrap > .table {
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
    }

/* important for bootstrap/grid parents */
.card-body,
.tab-content,
.tab-pane,
.row > *,
.col,
[class*="col-"] {
    min-width: 0;
}

/* nav */
.nav-link {
    color: #d0d7de;
}

    .nav-link:hover,
    .nav-link:focus {
        color: #fff;
    }

.top-row {
    background-color: #1e1e1e !important;
}

    .top-row a {
        color: #bbb;
    }

        .top-row a:hover {
            color: #fff;
        }

.text-muted {
    color: #9aa4af !important;
}

/* compact filter area */
.filter-card .card-body {
    padding: 0.65rem 0.7rem;
}

.filters-compact {
    gap: 0.4rem !important;
}

    .filters-compact .form-label {
        font-size: 0.92rem !important;
        margin-bottom: 0.1rem !important;
        line-height: 1.15;
    }

    .filters-compact .form-select,
    .filters-compact .btn {
        font-size: 0.82rem;
        padding-top: 0.28rem;
        padding-bottom: 0.28rem;
        min-height: 34px;
    }

    .filters-compact .form-select {
        padding-left: 0.55rem;
        padding-right: 2rem;
    }

    .filters-compact .btn {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

/* race table wrapper */
.race-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    touch-action: pan-x pan-y;
}

.race-table {
    width: 100%;
    margin-bottom: 0;
}



.race-row-league {
    border-left: 3px solid #5dade2; /* keep */
}

/* Sports Car - more vibrant but not harsh */
.race-row-sports-car {
    border-left: 3px solid #ff2a2a;
}

/* Oval - deeper + richer blue, clearly separat e from league */
.race-row-oval {
    border-left: 3px solid #1a4fff;
}

/* Dirt Oval - stronger clay tone */
.race-row-dirt-oval {
    border-left: 3px solid #9a5a2b;
}

/* Formula - brighter gold, still not yellow */
.race-row-formula {
    border-left: 3px solid #e0b83f;
}

/* Dirt Road - lively but controlled green */
.race-row-dirt-road {
    border-left: 3px solid #35b071;
}
@media (max-width: 1200px) {
    .race-table-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y !important;
        display: block;
        border: none !important;
        background: transparent !important;
    }

    .race-table {
        width: max-content !important;
        min-width: 1100px !important;
        margin-bottom: 0;
    }

    .race-table th,
    .race-table td {
        white-space: nowrap;
    }
}
