#kt_body {
    --kt-toolbar-height: 0px !important;
    --kt-toolbar-height-tablet-and-mobile: 0px !important;
}

#kt_toolbar {
    display: none !important;
}

#kt_content {
    --results-accent: #009ef7;
    --results-accent-surface: #eef8ff;
    --results-content-inline-pad: 1.75rem;
}

#RaceResultsTable .symbol-label.racer-num-badge {
    background-color: #ffffff !important;
    border: 1.5px solid #000 !important;
    box-sizing: border-box;
}

#RaceResultsTable .symbol.racer-num-symbol {
    height: 30px !important;
}

    #RaceResultsTable .symbol.racer-num-symbol .symbol-label {
        width: 45px !important;
        height: 30px !important;
        min-height: 0 !important;
        padding: 0 2px !important;
        box-sizing: border-box;
    }

#RaceResultsTable .results-accent-text {
    color: #000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 1;
    font-family: "Orbitron", sans-serif !important;
    font-weight: 700;
    letter-spacing: 0.06em;
    transform: skewX(-8deg);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

/* Center racer block in column; fixed max width keeps number boxes aligned row-to-row */
#RaceResultsTable .racer-cell-outer {
    display: flex;
    justify-content: center;
    width: 100%;
}

#RaceResultsTable .racer-cell-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: min(26rem, 100%);
}
/* Make DataTables Editor form scrollable */
.DTED_Lightbox_Content_Wrapper {
    max-height: 70vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Ensure the footer buttons remain visible */
.DTED_Lightbox_Container {
    display: flex !important;
    flex-direction: column !important;
}

.DTED_Lightbox_Content {
    flex: 1;
    overflow: hidden;
}

/* Keep a single page scroll and only allow horizontal table scroll on small screens */
#kt_table_users_wrapper .table-responsive {
    overflow: visible;
}

#RaceResultsTable thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Ensure header cells have solid background */
#RaceResultsTable thead th {
    background-color: var(--results-accent-surface);
    color: #000 !important;
}

#RaceResultsTable thead th a {
    color: #000 !important;
}

#RaceResultsTable thead th:nth-child(2),
#RaceResultsTable thead th:nth-child(2) .dt-column-header,
#RaceResultsTable thead th:nth-child(2) .dt-column-title {
    text-align: center !important;
}

#RaceResultsTable thead th:nth-child(2) {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#RaceResultsTable thead th:nth-child(2) .dt-column-order {
    display: none !important;
}

/* Replace muted result-page text with black */
#kt_content .text-muted,
#kt_content .text-gray-600,
#kt_content .text-gray-700,
#kt_content .text-gray-800 {
    color: #000 !important;
}

#kt_content .form-control,
#kt_content .form-control::placeholder {
    color: #000 !important;
    opacity: 1;
}

#RaceResultsTable {
    width: 100% !important;
}

.results-layout {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.results-surface {
    border: 1px solid #e7edf3;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.07);
}

.results-hero-card {
    overflow: hidden;
}

.results-hero-frame {
    position: relative;
    padding: 0;
    background: transparent;
}

.results-hero-image {
    min-height: 240px;
    border-radius: calc(1.5rem - 1px);
}

/* Default hero artwork (was inline background-image). */
.results-hero-image--default {
    background-image: url('/media/images/brian-childree.jpg');
}

/* Round-specific hero artwork: the URL is data-driven, so the view sets it via the
   --results-hero-bg custom property and this rule consumes it (no static inline style). */
.results-hero-image--dynamic {
    background-image: var(--results-hero-bg);
}

/* Hero darkening overlay (was inline opacity:0.4). Must out-specify Metronic's
   `.overlay.overlay-show .overlay-layer { opacity: 1 }` (0,3,0), or the black
   layer renders fully opaque and hides the hero image. */
.overlay.overlay-show .results-hero-overlay {
    opacity: 0.4;
}

.results-hero-copy {
    position: absolute;
    inset: auto var(--results-content-inline-pad) 2rem var(--results-content-inline-pad);
    z-index: 2;
    max-width: min(38rem, calc(100% - (var(--results-content-inline-pad) * 2)));
}

.results-table-card .card-header {
    padding-left: var(--results-content-inline-pad);
    padding-right: var(--results-content-inline-pad);
}

.results-table-card .card-body {
    padding-left: var(--results-content-inline-pad);
    padding-right: var(--results-content-inline-pad);
}

.results-table-card .card-header + .card-header {
    border-top: 1px solid #eff3f8;
    padding-top: 0.5rem;
}

.results-toolbar-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.95fr);
    gap: 1.25rem;
    align-items: end;
    width: 100%;
}

.results-summary-copy {
    min-width: 0;
}

.results-summary-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.25rem;
}

.results-summary-primary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.results-summary-copy .card-title,
.results-summary-inline .card-title {
    margin-bottom: 0;
}

.results-summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-top: 0;
}


.results-heat-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0;
    justify-content: flex-start;
}

.results-heat-toggle {
    min-width: 6.75rem;
    min-height: 48px;
    padding: 0.75rem 1.35rem !important;
    border-radius: 0.475rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 500 !important;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn.btn-secondary.results-heat-toggle.results-heat-toggle--active,
.btn.btn-secondary.results-heat-toggle.results-heat-toggle--active:hover,
.btn.btn-secondary.results-heat-toggle.results-heat-toggle--active:focus {
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    font-weight: 500 !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.16) !important;
    transform: translateY(0);
}

.results-heat-toggle.disabled {
    cursor: not-allowed;
    pointer-events: none;
    font-weight: 500 !important;
}

.results-public-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.results-public-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.results-public-buttons .dt-buttons {
    justify-content: flex-end;
}

.results-public-buttons:empty {
    display: none;
}

.results-mobile-buttons {
    display: none;
}

.results-public-buttons .btn,
.results-public-buttons .dt-button,
.results-mobile-buttons .btn,
.results-mobile-buttons .dt-button {
    min-height: 48px;
    padding: 0.75rem 1.35rem !important;
    border-radius: 0.75rem !important;
    font-size: 1.02rem;
    color: #000 !important;
}

.results-public-buttons .btn:hover,
.results-public-buttons .btn:focus,
.results-public-buttons .btn:active,
.results-public-buttons .dt-button:hover,
.results-public-buttons .dt-button:focus,
.results-public-buttons .dt-button:active,
.results-mobile-buttons .btn:hover,
.results-mobile-buttons .btn:focus,
.results-mobile-buttons .btn:active,
.results-mobile-buttons .dt-button:hover,
.results-mobile-buttons .dt-button:focus,
.results-mobile-buttons .dt-button:active {
    color: #000 !important;
}

.results-search-slot {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.results-search-slot .dt-search {
    width: 100%;
    max-width: 23rem;
}

.results-search-slot .dt-search input {
    width: 100% !important;
    min-width: 0;
    min-height: 48px;
    border-radius: 0.75rem;
    background: #f5f7fb;
    border-color: #e4e9f2;
    font-size: 1.05rem;
}

.results-public-toolbar.is-empty {
    display: none;
}

.results-admin-section {
    display: none;
    border-top: 1px solid #eff3f8;
    border-bottom: 1px solid #eff3f8;
    margin-top: 0.85rem;
    padding: 1rem 1.75rem 1.1rem;
}

.results-admin-section.is-visible {
    display: block;
}

.results-admin-shell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.results-admin-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.results-admin-kicker {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1;
    text-transform: uppercase;
    color: #181c32;
}

#resultsAdminButtons {
    width: 100%;
}

#resultsAdminButtons .dt-buttons {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
    width: 100%;
}

@media (max-width: 991.98px) {
    #kt_content {
        --results-content-inline-pad: 1.1rem;
    }

    .results-search-toolbar {
        display: none !important;
    }

    #kt_table_users_wrapper .table-responsive {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    #RaceResultsTable {
        min-width: 780px;
    }

    .results-hero-frame {
        padding: 0;
    }

    .results-hero-image {
        min-height: 160px !important;
    }

    .results-hero-copy {
        inset: auto var(--results-content-inline-pad) 1.35rem var(--results-content-inline-pad);
        max-width: calc(100% - (var(--results-content-inline-pad) * 2));
    }

    .results-toolbar-shell {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .results-heat-switch {
        justify-content: flex-start;
    }

    .results-public-toolbar,
    .results-search-slot {
        justify-content: flex-start;
    }

    .results-public-buttons,
    .results-public-buttons .dt-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .results-search-slot .dt-search {
        max-width: none;
    }

    .results-table-card .card-header,
    .results-table-card .card-body,
    .results-admin-section {
        padding-left: var(--results-content-inline-pad);
        padding-right: var(--results-content-inline-pad);
    }

    .results-admin-section {
        padding-top: 1rem;
        padding-bottom: 0.95rem;
        margin-top: 0.7rem;
    }
}

@media (max-width: 575.98px) {
    .results-layout {
        padding-top: 0.55rem;
        gap: 1.05rem;
    }

    .results-hero-image {
        min-height: 132px !important;
    }

    .results-hero-copy {
        inset: auto var(--results-content-inline-pad) 1rem var(--results-content-inline-pad);
        max-width: calc(100% - (var(--results-content-inline-pad) * 2));
    }

    .results-summary-primary {
        flex: 0 0 100%;
    }

    .results-summary-inline {
        gap: 0.65rem 0.9rem;
    }

    .results-heat-switch {
        gap: 0.55rem;
    }

    .results-heat-toggle {
        min-width: 5.5rem;
        padding-left: 1.05rem !important;
        padding-right: 1.05rem !important;
        font-size: 1rem;
    }

    .results-mobile-buttons {
        display: flex;
        align-items: center;
    }

    .results-admin-section {
        margin-top: 0.6rem;
        padding-top: 0.9rem;
        padding-bottom: 0.85rem;
    }

    .results-admin-shell {
        gap: 0.55rem;
    }

    #resultsAdminButtons .dt-buttons {
        gap: 0.55rem;
    }

    .results-mobile-buttons .dt-buttons {
        gap: 0.55rem;
        flex-wrap: wrap;
    }

    .results-public-toolbar {
        gap: 0.6rem;
    }

    .results-public-buttons .dt-buttons {
        gap: 0.55rem;
        flex-wrap: wrap;
    }
}
