.organization-header-meta-slot {
    margin-top: 0;
    display: flex;
    align-items: center;
    min-width: 0;
    justify-content: flex-start;
}

.results-header-meta {
    display: flex;
    align-items: center;
    min-width: 0;
    justify-content: flex-start;
}

.results-header-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem 0.5rem;
    min-width: 0;
}

.results-header-trail-item {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    white-space: nowrap;
}

.results-header-trail-item--separated::before {
    content: "|";
    margin-right: 0.5rem;
    color: #a1a5b7;
}

@media (min-width: 992px) {
    .organization-header-primary--with-meta {
        flex: 1 1 auto !important;
        min-width: 0;
        justify-content: flex-start;
    }

    .organization-header-brand {
        width: auto;
        max-width: 100%;
        gap: 1rem !important;
        justify-content: flex-start;
    }

    .organization-header-copy {
        flex: 0 1 auto;
        width: auto;
        flex-wrap: nowrap;
    }

    .organization-header-secondary--with-meta {
        flex: 0 0 auto !important;
    }

    .organization-header-meta-slot {
        width: auto;
        flex: 0 1 auto;
        margin-top: 0;
    }

    .results-header-trail {
        flex-wrap: nowrap;
    }
}

@media (max-width: 991.98px) {
    .organization-header-meta-slot {
        flex-basis: 100%;
    }
}

@media (max-width: 575.98px) {
    .header-tablet-and-mobile-fixed .header {
        height: 76px !important;
        min-height: 76px !important;
    }

    .header-tablet-and-mobile-fixed .wrapper {
        padding-top: 76px !important;
    }

    #kt_header > .container-fluid {
        min-height: 76px;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        align-items: center;
    }

    .results-header-trail {
        gap: 0.2rem 0.38rem;
    }

    .results-header-trail-item--separated::before {
        margin-right: 0.35rem;
    }
}

#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;
}

.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);
}

.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);
}

/* Racer # — outline style for all: white fill, 1.5px black border, black number */
#kt_table_users .symbol-label.racer-num-badge {
    background-color: #ffffff !important;
    border: 1.5px solid #000 !important;
    box-sizing: border-box;
}
/* Shorter badge (less vertical space than symbol-45px square) */
#kt_table_users .symbol.racer-num-symbol {
    height: 30px !important;
}

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

/* Match Race Results: toolbar flush to header top (theme card-header min-height + vertical center adds gap) */
.results-table-card > .card-header.border-0.pt-6 {
    align-items: flex-start;
    min-height: 0;
}

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

.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;
}

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

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

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

#kt_table_users thead th a.round-column-link {
    color: #000 !important;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
#kt_table_users thead th a.round-column-link:hover,
#kt_table_users thead th a.round-column-link:focus-visible {
    color: var(--results-accent) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
#kt_table_users thead th a.round-column-link .round-r-prefix {
    font-size: 13.4px;
}

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

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

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

#kt_table_users .racer-num-col {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.results-racer-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.results-racer-inner {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, max-content);
    column-gap: 0.5rem;
    align-items: center;
    max-width: 100%;
    min-width: 0;
}

.results-racer-badge-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.results-racer-copy-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-wrap: break-word;
}

/* 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;
}

#kt_table_users {
    width: 100% !important;
}

/* Match Race Results (Index) toolbar + search layout and styling */
.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-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-top: 0;
}

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

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

.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:empty {
    display: none;
}

.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,
#kt_content .results-search-slot .dt-search input.form-control {
    width: 100% !important;
    min-width: 0;
    min-height: 48px;
    border-radius: 0.75rem;
    background: #f5f7fb !important;
    border: 1px solid #e4e9f2 !important;
    font-size: 1.05rem;
}

.results-search-slot .dt-search input:focus,
#kt_content .results-search-slot .dt-search input.form-control:focus {
    border-color: #009EF7 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.25) !important;
}

#kt_content .results-search-slot .dt-search > .svg-icon {
    color: #a1a5b7;
}

/* Total Results search only: top offset (replaces .my-1 so margin-bottom isn’t applied here) */
.total-results-table-card .results-search-slot .dt-search {
    margin-top: 0.55rem !important;
}

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

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

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

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

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

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

    #kt_table_users {
        min-width: 860px;
    }

    .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-table-card .card-header,
    .results-table-card .card-body {
        padding-left: var(--results-content-inline-pad);
        padding-right: var(--results-content-inline-pad);
    }
}

@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-mobile-buttons {
        display: flex;
        align-items: center;
    }

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

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

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