/* =========================================================
   RESULTS HUB LAYOUT
========================================================= */
.motocol-results-hub{
    padding: 24px 0 40px;
}

.results-hub-head{
    position: relative;
    margin-bottom: 24px;
    padding: 28px 28px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #111 0%, #1b1b1b 60%, #222 100%);
    box-shadow: 0 12px 35px rgba(0,0,0,.14);
    overflow: hidden;
}

.results-hub-head::after{
    content: "";
    position: absolute;
    left: 28px;
    bottom: 0;
    width: 96px;
    height: 3px;
    background: #b11217;
    border-radius: 999px;
}

.results-hub-head .motocal-page-title{
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.results-hub-subtitle{
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

/* =========================================================
   FILTERS
========================================================= */
.results-hub-filters{
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

.results-hub-filter-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.results-hub-field{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.results-hub-field label{
    color: #222;
    font-size: 13px;
    font-weight: 700;
}

.results-hub-select{
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.09);
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.results-hub-select:focus{
    border-color: rgba(177,18,23,.45);
    box-shadow: 0 0 0 3px rgba(177,18,23,.10);
}

.results-hub-actions{
    margin-top: 16px;
}

.results-hub-submit{
    appearance: none;
    border: 0;
    background: #b11217;
    color: #fff;
    height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .22s ease;
}

.results-hub-submit:hover{
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(177,18,23,.20);
}

/* =========================================================
   EMPTY STATE
========================================================= */
.results-hub-empty{
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

.results-hub-empty p{
    margin: 0;
    color: #555;
    font-size: 15px;
    font-weight: 600;
}

/* =========================================================
   RESULT CARD
========================================================= */
.results-hub-result-card{
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

.results-hub-result-head{
    padding: 22px 22px 18px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    background: #fff;
}

.results-hub-result-meta{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.results-hub-series-badge{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: #b11217;
}

.results-hub-series-badge--motogp,
.results-hub-series-badge--worldsbk{
    background: #b11217;
}

.results-hub-series-badge--moto2,
.results-hub-series-badge--worldssp{
    background: #2563eb;
}

.results-hub-series-badge--moto3{
    background: #f59e0b;
}

.results-hub-country{
    color: #666;
    font-size: 13px;
    font-weight: 700;
}

.results-hub-race-title{
    margin: 0 0 8px;
    color: #111;
    font-size: clamp(24px, 3.5vw, 34px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.results-hub-race-info{
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.results-hub-result-content{
    padding: 20px;
}

/* =========================================================
   RACE SUBTABS
========================================================= */
.race-subtabs-nav{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding: 8px;
    border-radius: 16px;
    background: #f3f4f6;
    border: 1px solid rgba(0,0,0,.06);
}

.race-subtab-btn{
    appearance: none;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 14px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all .22s ease;
}

.race-subtab-btn:hover{
    background: rgba(177,18,23,.08);
    color: #b11217;
}

.race-subtab-btn.is-active{
    background: #b11217;
    color: #fff;
    box-shadow: 0 8px 22px rgba(177,18,23,.22);
}

.race-subtab-panel{
    display: none;
}

.race-subtab-panel.is-active{
    display: block;
}

/* =========================================================
   RESULT TABLES
========================================================= */
.race-results-card + .race-results-card{
    margin-top: 18px;
}

.race-results-card{
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
    background: #fff;
}

.race-results-card-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: #111;
}

.race-results-card-head h3{
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.half-point-badge{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.race-results-table-wrap{
    overflow-x: auto;
}

.race-results-table{
    width: 100%;
    border-collapse: collapse;
}

.race-results-table thead th{
    padding: 14px 16px;
    background: #f7f7f8;
    color: #444;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
}

.race-results-table tbody td{
    padding: 14px 16px;
    border-top: 1px solid rgba(0,0,0,.06);
    vertical-align: middle;
}

.race-results-table tbody tr.is-first{
    background: linear-gradient(90deg, rgba(177,18,23,.045) 0%, rgba(177,18,23,0) 40%);
}

.race-pos-number{
    font-size: 18px;
    font-weight: 800;
    color: #111;
}

.race-driver-wrap{
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.race-driver-flag{
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.race-driver-number{
    color: #777;
    font-size: 13px;
    font-weight: 700;
}

.race-driver-name{
    color: #111;
    font-size: 15px;
    font-weight: 800;
}

.race-points-badge{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(177,18,23,.08);
    color: #b11217;
    font-size: 14px;
    font-weight: 800;
}

.race-empty{
    padding: 18px;
    border-radius: 14px;
    background: #f7f7f8;
    color: #555;
    font-size: 15px;
    font-weight: 600;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 768px){
    .results-hub-head{
        padding: 22px 18px 18px;
        border-radius: 16px;
    }

    .results-hub-head::after{
        left: 18px;
        width: 72px;
    }

    .results-hub-head .motocal-page-title{
        font-size: 26px;
    }

    .results-hub-subtitle{
        font-size: 14px;
    }

    .results-hub-filter-grid{
        grid-template-columns: 1fr;
    }

    .results-hub-filters{
        padding: 14px;
    }

    .results-hub-result-head,
    .results-hub-result-content{
        padding: 16px;
    }

    .race-subtabs-nav{
        gap: 8px;
        padding: 6px;
        border-radius: 14px;
    }

    .race-subtab-btn{
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 10px;
    }

    .race-results-card-head{
        padding: 14px 14px;
    }

    .race-results-table thead th,
    .race-results-table tbody td{
        padding: 12px 12px;
    }
}

/* =========================================================
   RESULTS HUB REVISION
========================================================= */
.results-hub-race-hero{
    margin-bottom: 14px;
    padding: 26px 28px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f0f10 0%, #18181b 58%, #202024 100%);
    box-shadow: 0 14px 36px rgba(0,0,0,.16);
}

.results-hub-race-hero__meta{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
}

.results-hub-race-hero__title{
    margin:0 0 10px;
    color:#fff;
    font-size: clamp(28px, 4vw, 40px);
    line-height:1.06;
    font-weight:800;
    letter-spacing:-0.02em;
}

.results-hub-race-hero__info{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:14px;
    color:rgba(255,255,255,.82);
    font-size:14px;
    font-weight:600;
}

.results-hub-race-hero__country{
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.results-hub-race-hero__flag{ display:block; border-radius:3px; }

.results-hub-filters{
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(177,18,23,.16);
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

.results-hub-filter-grid,
.results-hub-filter-grid--3col{
    display:grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap:14px;
}

.results-hub-field{ gap:7px; }
.results-hub-field label{ color:#4a4a4a; font-size:12px; letter-spacing:.02em; text-transform:uppercase; }
.results-hub-select{
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    width:100%;
    height:50px;
    padding:0 46px 0 16px;
    border-radius:14px;
    border:1px solid rgba(177,18,23,.18);
    background-color:#fcfcfc;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4.5 6.75L9 11.25L13.5 6.75' stroke='%23b11217' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), linear-gradient(180deg, #ffffff 0%, #f6f7f8 100%);
    background-repeat:no-repeat, no-repeat;
    background-position:right 14px center, center;
    background-size:18px 18px, 100% 100%;
    box-shadow:0 1px 0 rgba(255,255,255,.95) inset, 0 8px 18px rgba(17,17,17,.05);
    color:#111;
    font-size:14px;
    font-weight:700;
    letter-spacing:-0.01em;
    cursor:pointer;
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease, transform .18s ease;
}
.results-hub-select:hover{
    border-color:rgba(177,18,23,.34);
    background-color:#fff;
    box-shadow:0 1px 0 rgba(255,255,255,.98) inset, 0 10px 22px rgba(17,17,17,.07);
}
.results-hub-select:focus,
.results-hub-select:active{
    border-color:#b11217;
    box-shadow:0 0 0 4px rgba(177,18,23,.10), 0 12px 26px rgba(17,17,17,.08);
    background-color:#fff;
}
.results-hub-select::-ms-expand{
    display:none;
}

.race-results-card-head{
    padding: 12px 14px;
}
.race-results-card-head h3{
    font-size: 17px;
}
.race-results-table.compact-table thead th{
    padding: 10px 14px;
    font-size: 12px;
}
.race-results-table.compact-table tbody td{
    padding: 9px 14px;
}
.race-driver-wrap{
    display:flex;
    align-items:center;
    gap:10px;
}
.race-driver-texts{
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
}
.race-driver-name{
    display:block;
    line-height:1.15;
}
.race-driver-team{
    display:block;
    color:#777;
    font-size:11px;
    font-weight:600;
    line-height:1.15;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.race-driver-number{
    margin-right:0;
}
.race-driver-status{
    margin-left:auto;
    color:#8b1c1f;
    font-size:11px;
    font-weight:700;
}

@media (max-width: 900px){
    .results-hub-filter-grid,
    .results-hub-filter-grid--3col{
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   RESULTS HUB – PREMIUM FILTERS / COMPACT ROWS
========================================================= */
.results-hub-filter-grid--3col{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.results-hub-field{
    position: relative;
    min-width: 0;
}

.results-hub-select--native{
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.results-hub-dropdown{
    position: relative;
}

.results-hub-dropdown__trigger{
    position: relative;
    width: 100%;
    min-height: 52px;
    padding: 0 46px 0 15px;
    border: 1px solid rgba(177,18,23,.22);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,.96) inset, 0 10px 24px rgba(17,17,17,.06);
    color: #121212;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.results-hub-dropdown__trigger:hover{
    border-color: rgba(177,18,23,.38);
    box-shadow: 0 1px 0 rgba(255,255,255,.98) inset, 0 12px 26px rgba(17,17,17,.08);
}

.results-hub-dropdown.is-open .results-hub-dropdown__trigger,
.results-hub-dropdown__trigger:focus-visible{
    outline: none;
    border-color: #b11217;
    box-shadow: 0 0 0 4px rgba(177,18,23,.10), 0 14px 28px rgba(17,17,17,.10);
    background: linear-gradient(180deg, #ffffff 0%, #fbf6f6 100%);
}

.results-hub-dropdown__value{
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-hub-dropdown__chevron{
    position: absolute;
    top: 50%;
    right: 16px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #b11217;
    border-bottom: 2px solid #b11217;
    transform: translateY(-64%) rotate(45deg);
    transition: transform .18s ease;
}

.results-hub-dropdown.is-open .results-hub-dropdown__chevron{
    transform: translateY(-34%) rotate(-135deg);
}

.results-hub-dropdown__menu{
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 40;
    display: none;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 22px 48px rgba(0,0,0,.12);
    max-height: 320px;
    overflow-y: auto;
}

.results-hub-dropdown.is-open .results-hub-dropdown__menu{
    display: block;
}

.results-hub-dropdown__option{
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.results-hub-dropdown__option:hover,
.results-hub-dropdown__option:focus-visible{
    outline: none;
    background: #f3f4f6;
    color: #111827;
}

.results-hub-dropdown__option.is-selected{
    background: linear-gradient(90deg, rgba(177,18,23,.12) 0%, rgba(177,18,23,.06) 100%);
    color: #b11217;
}

.results-hub-dropdown__option.is-selected::after{
    content: "";
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e0363f;
    box-shadow: 0 0 0 4px rgba(224,54,63,.14);
}

.race-results-card-head{
    padding: 10px 14px;
}

.race-results-table.compact-table thead th{
    padding: 8px 12px;
    font-size: 11px;
}

.race-results-table.compact-table tbody td{
    padding: 7px 12px;
}

.race-results-table.compact-table .col-points,
.race-results-table.compact-table .race-points-cell{
    text-align: right;
}

.race-results-table.compact-table .race-points-cell{
    width: 88px;
}

.race-points-badge{
    min-width: 40px;
    padding: 5px 8px;
    font-size: 11px;
}

.race-driver-wrap{
    gap: 9px;
}

.race-driver-number{
    min-width: 38px;
    padding: 4px 7px;
    font-size: 10px;
}

.race-driver-name{
    font-size: 13px;
}

.race-driver-team{
    font-size: 10px;
}

@media (max-width: 900px){
    .results-hub-filter-grid--3col{
        grid-template-columns: 1fr;
    }
}

/* rev10 white dropdown hard override */
.results-hub-filter-bar .results-hub-dropdown__menu{background:#fff !important;border-color:#e5e7eb !important;box-shadow:0 22px 48px rgba(0,0,0,.12) !important;}
.results-hub-filter-bar .results-hub-dropdown__option{color:#111827 !important;background:transparent !important;}
.results-hub-filter-bar .results-hub-dropdown__option:hover,
.results-hub-filter-bar .results-hub-dropdown__option:focus-visible{background:#f3f4f6 !important;color:#111827 !important;}
.results-hub-filter-bar .results-hub-dropdown__option.is-selected{background:linear-gradient(90deg, rgba(177,18,23,.12) 0%, rgba(177,18,23,.06) 100%) !important;color:#b11217 !important;}
