/* ============================================
   VCR Race History — Shortcode [race_history]
   Dark theme, responsive card grid
   ============================================ */

/* ─── Container ─────────────────────────────── */
.vcr-rh-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e6edf3;
    position: relative;
}

/* ─── Header ────────────────────────────────── */
.vcr-rh-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.vcr-rh-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #e6edf3 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.vcr-rh-count {
    font-size: 14px;
    color: #8b949e;
}

.vcr-rh-nav-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #f78166;
    background: rgba(247,129,102,0.12);
    color: #ffd7cc !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}

.vcr-rh-nav-btn:hover {
    background: #f78166;
    color: #0d1117 !important;
}

/* ─── Filters ───────────────────────────────── */
.vcr-rh-filters {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.vcr-rh-filters-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    color: #e6edf3;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
    transition: background 0.15s;
}

.vcr-rh-filters-toggle:hover {
    background: #1c2128;
}

.vcr-rh-filters-chevron {
    transition: transform 0.2s;
}

.vcr-rh-chevron-open {
    transform: rotate(180deg);
}

.vcr-rh-filters-body {
    display: none;
    padding: 14px 20px 16px;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    border-top: 1px solid #21262d;
}

.vcr-rh-filters-body[style*="block"] {
    display: flex !important;
}

.vcr-rh-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vcr-rh-perpage-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vcr-rh-perpage-pills {
    gap: 4px !important;
}

.vcr-rh-filter-row-actions {
    margin-left: auto;
    gap: 12px;
}

.vcr-rh-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Filter pills */
.vcr-rh-filter-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.vcr-rh-pill {
    background: transparent !important;
    border: 1px solid #30363d !important;
    color: #8b949e !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    outline: none !important;
    line-height: 1.4 !important;
}

.vcr-rh-pill:hover {
    border-color: var(--pill-color, #8b949e) !important;
    color: var(--pill-color, #8b949e) !important;
}

.vcr-rh-pill.active {
    background: var(--pill-color, #58a6ff) !important;
    border-color: var(--pill-color, #58a6ff) !important;
    color: #0d1117 !important;
    font-weight: 600 !important;
}

/* Track dropdown */
.vcr-rh-filter-select {
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    color: #e6edf3 !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    outline: none !important;
    min-width: 150px !important;
}

.vcr-rh-filter-select:focus {
    border-color: #58a6ff !important;
}

/* Date inputs */
.vcr-rh-date-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vcr-rh-date {
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    color: #e6edf3 !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    outline: none !important;
    width: 130px !important;
}

.vcr-rh-date:focus {
    border-color: #58a6ff !important;
}

.vcr-rh-date-sep {
    color: #484f58;
    font-size: 12px;
}

/* My races toggle */
.vcr-rh-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.vcr-rh-toggle {
    accent-color: #e88c4a;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.vcr-rh-toggle-text {
    font-size: 12px;
    color: #8b949e;
    font-weight: 500;
}

/* Search input */
.vcr-rh-search {
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    color: #e6edf3 !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    outline: none !important;
    width: 180px !important;
}

.vcr-rh-search:focus {
    border-color: #58a6ff !important;
}

.vcr-rh-search::placeholder {
    color: #484f58;
}

/* Reset button */
.vcr-rh-reset {
    background: transparent !important;
    border: 1px solid #30363d !important;
    color: #f85149 !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.vcr-rh-reset:hover {
    background: #f8514920 !important;
    border-color: #f85149 !important;
}

/* ─── Card Grid ─────────────────────────────── */
.vcr-rh-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* ─── Card ──────────────────────────────────── */
.vcr-rh-card {
    background: #161b22;
    border: 1px solid var(--card-border, #30363d);
    border-left: 3px solid var(--card-border, #30363d);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.vcr-rh-card:hover {
    border-color: #484f58;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Card with track background image */
.vcr-rh-card.vcr-rh-card-with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.vcr-rh-card.vcr-rh-card-with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.75) 0%, rgba(13, 17, 23, 0.90) 100%);
    z-index: 1;
    border-radius: 10px;
}

.vcr-rh-card.vcr-rh-card-with-bg > * {
    position: relative;
    z-index: 2;
}

/* Card header */
.vcr-rh-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.vcr-rh-card-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #e6edf3 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    flex: 1;
}

.vcr-rh-card-badges {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.vcr-rh-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vcr-rh-badge-vcr {
    background: #e88c4a;
    color: #0d1117;
}

.vcr-rh-badge-you {
    background: #238636;
    color: #fff;
}

.vcr-rh-badge-processing {
    background: rgba(210, 153, 34, 0.16);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.35);
}

.vcr-rh-row-you {
    background: rgba(35, 134, 54, 0.15) !important;
}
.vcr-rh-row-you td {
    color: #3fb950 !important;
    font-weight: 600;
}
.vcr-rh-badge-you-sm {
    display: inline-block;
    background: #238636;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.vcr-rh-modal-body {
    padding: 20px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
}

.vcr-rh-session-section {
    margin-bottom: 18px;
}

.vcr-rh-session-section:last-child {
    margin-bottom: 0;
}

.vcr-rh-session-subtabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.vcr-rh-session-subtab {
    appearance: none;
    border: 1px solid #30363d;
    background: #161b22;
    color: #8b949e;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.vcr-rh-session-subtab:hover {
    color: #e6edf3;
    border-color: #58a6ff;
}

.vcr-rh-session-subtab.active {
    color: #e6edf3;
    background: rgba(88, 166, 255, 0.12);
    border-color: #58a6ff;
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.15);
}

.vcr-rh-session-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 8px;
    flex-wrap: wrap;
}

.vcr-rh-session-heading-main,
.vcr-rh-session-heading-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vcr-rh-session-date {
    font-size: 12px;
    color: #8b949e;
    font-weight: 500;
}

.vcr-rh-session-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    font-size: 11px;
    font-weight: 600;
}

/* Track subtitle */
.vcr-rh-card-track {
    font-size: 12px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card body */
.vcr-rh-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.vcr-rh-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Date */
.vcr-rh-card-date {
    font-size: 12px;
    color: #8b949e;
}

/* Platform badge */
.vcr-rh-badge-platform {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--plat-color, #8b949e);
    color: var(--plat-color, #8b949e);
    background: transparent;
}

/* Category badge */
.vcr-rh-badge-cat {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--cat-color, #8b949e);
    color: var(--cat-color, #8b949e);
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Game badge */
.vcr-rh-badge-game {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--game-color, #8b949e);
    color: var(--game-color, #8b949e);
    background: transparent;
}

/* Card title text + info icon */
.vcr-rh-card-title {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.vcr-rh-card-title-text {
    cursor: pointer;
    transition: color 0.15s;
}

.vcr-rh-card-title-text:hover {
    color: #58a6ff;
}

.vcr-rh-card-info-btn {
    cursor: pointer;
    color: #d4ff00;
    transition: color 0.15s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.vcr-rh-card-info-btn:hover {
    color: #eeff66;
}

/* Weather */
.vcr-rh-weather-icon {
    font-size: 14px;
}

/* Winner */
.vcr-rh-card-winner {
    padding: 4px 0;
}

.vcr-rh-card-winner svg {
    flex-shrink: 0;
}

.vcr-rh-winner-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffc107;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.vcr-rh-winner-car {
    font-size: 11px;
    color: #8b949e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Stats */
.vcr-rh-card-stats {
    gap: 12px;
}

.vcr-rh-stat {
    font-size: 12px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vcr-rh-stat svg {
    flex-shrink: 0;
}

.vcr-rh-stat-lap {
    color: #a371f7;
    font-weight: 600;
}

/* Session badges */
.vcr-rh-card-sessions {
    gap: 4px;
    margin-top: auto;
    padding-top: 4px;
}

.vcr-rh-session-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: #21262d;
    color: #484f58;
    border: 1px solid #30363d;
}

.vcr-rh-session-q {
    color: #58a6ff;
    border-color: #58a6ff40;
}

.vcr-rh-session-r {
    color: #f85149;
    border-color: #f8514940;
}

/* Card footer */
.vcr-rh-card-footer {
    padding-top: 8px;
    border-top: 1px solid #21262d;
}

.vcr-rh-btn-details {
    width: 100%;
    background: transparent !important;
    border: 1px solid #58a6ff !important;
    color: #58a6ff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.vcr-rh-btn-details:hover {
    background: #58a6ff !important;
    color: #0d1117 !important;
}

/* ─── Pagination ────────────────────────────── */
.vcr-rh-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
    flex-wrap: wrap;
}

.vcr-rh-pager-info {
    font-size: 13px;
    color: #8b949e;
}

.vcr-rh-pager-btns {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.vcr-rh-pager-btn {
    background: #21262d !important;
    border: 1px solid #30363d !important;
    color: #8b949e !important;
    font-size: 12px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.vcr-rh-pager-btn:hover:not([disabled]) {
    background: #30363d !important;
    color: #e6edf3 !important;
}

.vcr-rh-pager-btn[disabled] {
    opacity: 0.4 !important;
    cursor: default !important;
}

.vcr-rh-pager-active {
    background: #58a6ff !important;
    border-color: #58a6ff !important;
    color: #0d1117 !important;
    font-weight: 700 !important;
}

.vcr-rh-pager-dots {
    color: #484f58;
    font-size: 12px;
    padding: 0 4px;
}

/* ─── Loading overlay ───────────────────────── */
.vcr-rh-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 10px;
}

.vcr-rh-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #30363d;
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: vcr-rh-spin 0.8s linear infinite;
}

@keyframes vcr-rh-spin {
    to { transform: rotate(360deg); }
}

/* ─── Empty state ───────────────────────────── */
.vcr-rh-empty {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.vcr-rh-empty p {
    color: #8b949e;
    font-size: 16px;
    margin: 12px 0 0 !important;
}

.vcr-rh-empty-sub {
    font-size: 13px !important;
    color: #484f58 !important;
}

/* ─── Details Modal ─────────────────────────── */
.vcr-rh-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.75) !important;
    z-index: 100000 !important;
    /* display is toggled via JS .show()/.hide() — do NOT use !important here */
    align-items: center;
    justify-content: center;
    padding: 20px !important;
    overflow: hidden !important;
    transform: none !important;
    margin: 0 !important;
}

.vcr-rh-modal {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 900px !important;
    max-height: 85vh !important;
    display: grid !important;
    grid-template-rows: auto auto 1fr !important;
    overflow: hidden !important;
}

.vcr-rh-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #21262d !important;
    overflow: hidden !important;
}

.vcr-rh-modal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #e6edf3 !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}

.vcr-rh-modal-track {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #8b949e !important;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-rh-modal-close {
    background: none !important;
    border: none !important;
    color: #8b949e !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 0 4px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.vcr-rh-modal-close:hover {
    color: #e6edf3 !important;
}

/* Modal tabs */
.vcr-rh-modal-tabs {
    display: flex !important;
    gap: 0 !important;
    border-bottom: 1px solid #21262d !important;
    padding: 0 20px !important;
    overflow-x: auto !important;
}

.vcr-rh-modal-tab {
    background: transparent !important;
    border: none !important;
    color: #8b949e !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    cursor: pointer !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.15s !important;
    margin-bottom: -1px !important;
    white-space: nowrap !important;
}

.vcr-rh-modal-tab:hover {
    color: #e6edf3 !important;
}

.vcr-rh-modal-tab.active {
    color: #58a6ff !important;
    border-bottom-color: #58a6ff !important;
}

/* Modal body */
.vcr-rh-modal-body {
    padding: 20px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
}

/* Title link (clickable for info modal) */
.vcr-rh-title-link {
    cursor: pointer;
    transition: color 0.15s;
}

.vcr-rh-title-link:hover {
    color: #58a6ff !important;
}

/* ─── Info Modal ───────────────────────────── */
.vcr-rh-info-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.6) !important;
    z-index: 100001 !important;
    align-items: center;
    justify-content: center;
    padding: 20px !important;
    overflow: hidden !important;
    transform: none !important;
    margin: 0 !important;
}

.vcr-rh-info-modal {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 420px !important;
    max-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.vcr-rh-info-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #21262d !important;
}

.vcr-rh-info-modal-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #e6edf3 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.vcr-rh-info-modal-close {
    background: none !important;
    border: none !important;
    color: #8b949e !important;
    font-size: 22px !important;
    cursor: pointer !important;
    padding: 0 4px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.vcr-rh-info-modal-close:hover {
    color: #e6edf3 !important;
}

.vcr-rh-info-modal-body {
    padding: 16px 18px !important;
    overflow-y: auto !important;
}

/* Info rows */
.vcr-rh-info-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.vcr-rh-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #21262d;
}

.vcr-rh-info-row:last-child {
    border-bottom: none;
}

.vcr-rh-info-icon {
    width: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b949e;
}

.vcr-rh-info-label {
    font-size: 12px;
    color: #8b949e;
    min-width: 90px;
    flex-shrink: 0;
}

.vcr-rh-info-value {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
    text-align: right;
    flex: 1;
}

.vcr-rh-info-bestlap {
    color: #d946ef !important;
}

.vcr-rh-info-value .vcr-rh-badge-cat,
.vcr-rh-info-value .vcr-rh-session-badge {
    margin-left: 4px;
}

/* Results table */
.vcr-rh-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.vcr-rh-results-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    border-bottom: 1px solid #30363d;
    white-space: nowrap;
}

.vcr-rh-results-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #21262d;
    color: #e6edf3;
    vertical-align: middle;
}

.vcr-rh-results-table tr:hover td {
    background: #21262d;
}

/* Position column */
.vcr-rh-pos {
    font-weight: 700;
    width: 36px;
    text-align: center;
}

.vcr-rh-pos-1 { color: #ffd700; }
.vcr-rh-pos-2 { color: #c0c0c0; }
.vcr-rh-pos-3 { color: #cd7f32; }

.vcr-rh-driver-name {
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcr-rh-car-name {
    color: #8b949e;
    font-size: 11px;
}

.vcr-rh-lap-purple {
    color: #a371f7;
    font-weight: 600;
}

.vcr-rh-status-dnf {
    color: #f85149;
    font-weight: 600;
}

.vcr-rh-status-dsq {
    color: #f85149;
    font-weight: 700;
    text-transform: uppercase;
}

/* Penalty table */
.vcr-rh-penalty-row td {
    font-size: 12px;
}

.vcr-rh-penalty-type {
    color: #f85149;
    font-weight: 600;
}

.vcr-rh-penalty-reason {
    color: #ffc107;
}

/* Race info section */
.vcr-rh-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 13px;
}

.vcr-rh-info-label {
    color: #8b949e;
    font-weight: 600;
}

.vcr-rh-info-value {
    color: #e6edf3;
}

/* Modal loading */
.vcr-rh-modal-loading {
    text-align: center;
    padding: 40px;
    color: #8b949e;
}

/* ─── Category Selector ────────────────────── */
.vcr-rh-cat-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.vcr-rh-cat-pill {
    background: transparent !important;
    border: 1.5px solid var(--cat-color, #8b949e) !important;
    color: var(--cat-color, #8b949e) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.vcr-rh-cat-pill:hover {
    background: color-mix(in srgb, var(--cat-color) 15%, transparent) !important;
}

.vcr-rh-cat-pill.active {
    background: var(--cat-color) !important;
    color: #fff !important;
}

/* ─── Mini Cards ───────────────────────────── */
.vcr-rh-minicards {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vcr-rh-minicard {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 16px;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 8px;
    transition: background 0.15s ease;
    position: relative;
    flex-wrap: wrap;
}

.vcr-rh-minicard:hover {
    background: #1c2128;
}

/* Winner card */
.vcr-rh-minicard-winner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 215, 0, 0.06) 100%);
    border-color: rgba(255, 215, 0, 0.45);
}

.vcr-rh-minicard-winner:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0.10) 100%);
}

/* Podium P2/P3 card */
.vcr-rh-minicard-podium {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.28) 0%, rgba(88, 166, 255, 0.10) 100%);
    border-color: rgba(88, 166, 255, 0.55);
}

.vcr-rh-minicard-podium:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.35) 0%, rgba(88, 166, 255, 0.15) 100%);
}

/* Zebra odd rows */
.vcr-rh-minicard-odd {
    background: #252d38;
    border-color: #30394a;
}

.vcr-rh-minicard-odd:hover {
    background: #2b3544;
}

/* DNF/DSQ cards */
.vcr-rh-minicard-dnf,
.vcr-rh-minicard-dsq {
    opacity: 0.6;
}

/* Position column */
.vcr-rh-mc-pos-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 32px;
    gap: 2px;
}

.vcr-rh-mc-pos {
    font-size: 16px;
    font-weight: 800;
    color: #e6edf3;
    line-height: 1;
}

.vcr-rh-mc-pos-1 {
    color: #ffd700;
    font-size: 18px;
}

.vcr-rh-mc-pos-2 {
    color: #58a6ff;
}

.vcr-rh-mc-pos-3 {
    color: #58a6ff;
}

/* Position change delta */
.vcr-rh-mc-delta {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.vcr-rh-mc-delta-up {
    color: #3fb950;
}

.vcr-rh-mc-delta-down {
    color: #f85149;
}

.vcr-rh-mc-delta-same {
    color: #484f58;
    font-size: 10px;
}

/* Car image */
.vcr-rh-mc-car-img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    background: #21262d;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcr-rh-mc-car-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vcr-rh-mc-car-placeholder {
    font-size: 20px;
    opacity: 0.4;
}

/* Driver info */
.vcr-rh-mc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vcr-rh-mc-driver {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-rh-mc-car {
    font-size: 11px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-rh-mc-warning {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    font-size: 10px;
    font-weight: 700;
    color: #d29922;
    background: rgba(210, 153, 34, 0.12);
    border: 1px solid rgba(210, 153, 34, 0.28);
    border-radius: 999px;
    padding: 2px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-rh-mc-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.vcr-rh-mc-reward {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    border-radius: 999px;
    padding: 2px 6px;
    white-space: nowrap;
}

.vcr-rh-mc-reward-points {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.28);
}

.vcr-rh-mc-reward-gr {
    color: #d29922;
    background: rgba(210, 153, 34, 0.12);
    border: 1px solid rgba(210, 153, 34, 0.28);
}

.vcr-rh-mc-reward-gm {
    color: #a371f7;
    background: rgba(163, 113, 247, 0.12);
    border: 1px solid rgba(163, 113, 247, 0.28);
}

/* Timing column */
.vcr-rh-mc-timing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    min-width: 80px;
}

.vcr-rh-mc-gap {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
}

.vcr-rh-mc-penalty-time {
    font-size: 11px;
    font-weight: 700;
    color: #f85149;
}

.vcr-rh-mc-bestlap {
    font-size: 10px;
    color: #8b949e;
}

.vcr-rh-mc-bestlap-purple {
    background: rgba(190, 60, 210, 0.2);
    color: #d946ef;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(217, 70, 239, 0.4);
}

/* ─── Penalty Cards ────────────────────────── */
.vcr-rh-penalty-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vcr-rh-penalty-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #161b22;
    border: 1px solid #21262d;
    border-left: 3px solid #f85149;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.vcr-rh-penalty-card:hover {
    background: #1c2128;
}

.vcr-rh-penalty-card-odd {
    background: #1c2128;
}

.vcr-rh-penalty-card-odd:hover {
    background: #22272e;
}

.vcr-rh-penalty-card-post {
    border-left-color: #d29922;
}

/* Driver + car info */
.vcr-rh-penalty-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.vcr-rh-penalty-driver {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-rh-penalty-car {
    font-size: 10px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Penalty details */
.vcr-rh-penalty-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.vcr-rh-penalty-badge {
    display: inline-block;
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(248, 81, 73, 0.3);
    white-space: nowrap;
}

.vcr-rh-penalty-card-post .vcr-rh-penalty-badge {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
    border-color: rgba(210, 153, 34, 0.3);
}

.vcr-rh-penalty-reason {
    font-size: 10px;
    color: #8b949e;
    white-space: nowrap;
}

/* Meta: lap, cleared, post-race */
.vcr-rh-penalty-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    min-width: 50px;
}

.vcr-rh-penalty-lap {
    font-size: 11px;
    color: #8b949e;
}

.vcr-rh-penalty-cleared {
    font-size: 9px;
    color: #3fb950;
}

.vcr-rh-penalty-post-badge {
    display: inline-block;
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid rgba(210, 153, 34, 0.3);
}

/* ─── Starting Grid (Qualifying) ───────────── */
.vcr-rh-starting-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding: 10px 0;
    overflow-x: hidden;
}

/* Center line */
.vcr-rh-starting-grid::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        #30363d 0px,
        #30363d 8px,
        transparent 8px,
        transparent 16px
    );
    transform: translateX(-50%);
    z-index: 0;
}

.vcr-rh-grid-row {
    display: flex;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

/* Left-side cards (odd positions: P1, P3, P5...) */
.vcr-rh-grid-row:has(.vcr-rh-grid-card-left) {
    justify-content: flex-start;
}

/* Right-side cards (even positions: P2, P4, P6...) */
.vcr-rh-grid-row:has(.vcr-rh-grid-card-right) {
    justify-content: flex-end;
}

.vcr-rh-grid-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 8px;
    width: 48%;
    max-width: 48%;
    box-sizing: border-box;
    transition: background 0.15s ease;
}

.vcr-rh-grid-card:hover {
    background: #1c2128;
}

/* Pole position card */
.vcr-rh-grid-card-pole {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 215, 0, 0.06) 100%);
    border-color: rgba(255, 215, 0, 0.45);
}

.vcr-rh-grid-card-pole:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 215, 0, 0.10) 100%);
}

/* P2 azzurro card */
.vcr-rh-grid-card-p2 {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.28) 0%, rgba(88, 166, 255, 0.10) 100%);
    border-color: rgba(88, 166, 255, 0.55);
}

.vcr-rh-grid-card-p2:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.35) 0%, rgba(88, 166, 255, 0.15) 100%);
}

/* Zebra row striping */
.vcr-rh-grid-card-zebra {
    background: #252d38;
    border-color: #30394a;
}

.vcr-rh-grid-card-zebra:hover {
    background: #2b3544;
}

/* Position label */
.vcr-rh-grid-pos {
    font-size: 12px;
    font-weight: 800;
    color: #8b949e;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.vcr-rh-grid-pos-1 {
    color: #ffd700;
    font-size: 14px;
}

/* Car image in grid */
.vcr-rh-grid-car-img {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    overflow: hidden;
    background: #21262d;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcr-rh-grid-car-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Driver info in grid */
.vcr-rh-grid-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.vcr-rh-grid-driver {
    font-size: 12px;
    font-weight: 600;
    color: #e6edf3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcr-rh-grid-car {
    font-size: 10px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Timing in grid */
.vcr-rh-grid-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    flex-shrink: 0;
}

.vcr-rh-grid-lap {
    font-size: 12px;
    font-weight: 600;
    color: #e6edf3;
}

.vcr-rh-grid-gap {
    font-size: 9px;
    color: #8b949e;
}

/* Race number badge */
.vcr-rh-mc-race-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 16px;
    padding: 0 4px;
    background: #e6edf3;
    color: #0d1117;
    font-size: 10px;
    font-weight: 800;
    border-radius: 3px;
    font-style: italic;
    letter-spacing: -0.3px;
    line-height: 1;
    vertical-align: middle;
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 1024px) {
    .vcr-rh-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .vcr-rh-container {
        padding: 12px;
    }
    
    .vcr-rh-grid {
        grid-template-columns: 1fr;
    }
    
    .vcr-rh-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .vcr-rh-filter-row {
        width: 100%;
    }
    
    .vcr-rh-filter-row-actions {
        margin-left: 0;
        flex-wrap: wrap;
    }
    
    .vcr-rh-search {
        width: 100% !important;
    }
    
    .vcr-rh-pager {
        flex-direction: column;
        align-items: center;
    }
    
    /* Modal: near-fullscreen on tablet */
    .vcr-rh-modal-overlay {
        padding: 8px !important;
        align-items: flex-start !important;
    }
    
    .vcr-rh-modal {
        max-height: calc(100vh - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
        border-radius: 8px !important;
    }
    
    .admin-bar .vcr-rh-modal-overlay {
        padding-top: 40px !important;
    }
    
    .admin-bar .vcr-rh-modal {
        max-height: calc(100vh - 56px) !important;
        max-height: calc(100dvh - 56px) !important;
    }
    
    .vcr-rh-modal-header {
        padding: 12px 16px !important;
    }
    
    .vcr-rh-modal-tab {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .vcr-rh-modal-body {
        padding: 14px !important;
    }
    
    .vcr-rh-results-table {
        font-size: 11px;
    }
    
    .vcr-rh-results-table th,
    .vcr-rh-results-table td {
        padding: 6px;
    }
    
    /* Starting grid responsive */
    .vcr-rh-grid-card {
        width: 55%;
        max-width: 55%;
    }
}

@media (max-width: 480px) {
    .vcr-rh-header {
        flex-direction: column;
        gap: 4px;
    }
    
    .vcr-rh-card {
        padding: 12px;
    }
    
    /* Modal fullscreen on phone */
    .vcr-rh-modal-overlay {
        padding: 0 !important;
        align-items: flex-start !important;
    }
    
    .vcr-rh-modal {
        max-height: 100vh !important;
        max-height: 100dvh !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
    }
    
    .admin-bar .vcr-rh-modal-overlay {
        top: 46px !important;
        bottom: 0 !important;
    }
    
    .admin-bar .vcr-rh-modal {
        max-height: calc(100vh - 46px) !important;
        max-height: calc(100dvh - 46px) !important;
    }
    
    .vcr-rh-modal-header {
        padding: 10px 14px !important;
    }
    
    .vcr-rh-modal-title {
        font-size: 15px !important;
    }
    
    .vcr-rh-modal-close {
        font-size: 28px !important;
        padding: 4px 8px !important;
        min-width: 36px;
        min-height: 36px;
    }
    
    .vcr-rh-modal-body {
        padding: 10px;
    }
    
    /* Race minicards mobile */
    .vcr-rh-minicard {
        gap: 6px;
        padding: 6px 8px;
    }
    
    .vcr-rh-mc-car-img {
        width: 32px;
        height: 32px;
    }
    
    .vcr-rh-mc-driver {
        font-size: 12px;
    }
    
    .vcr-rh-mc-car {
        font-size: 10px;
    }
    
    .vcr-rh-mc-timing {
        min-width: 55px;
    }
    
    .vcr-rh-mc-gap {
        font-size: 11px;
    }
    
    .vcr-rh-mc-bestlap {
        font-size: 9px;
    }
    
    .vcr-rh-mc-pos-col {
        min-width: 26px;
    }
    
    .vcr-rh-mc-pos {
        font-size: 14px;
    }
    
    .vcr-rh-mc-pos-1 {
        font-size: 15px;
    }
    
    /* Starting grid mobile */
    .vcr-rh-starting-grid {
        padding: 6px 0;
    }
    
    .vcr-rh-grid-card {
        width: 70%;
        max-width: 70%;
    }
    
    .vcr-rh-grid-row {
        margin-bottom: 8px;
    }
    
    .vcr-rh-grid-card {
        padding: 5px 8px;
        gap: 5px;
    }
    
    .vcr-rh-grid-car-img {
        width: 28px;
        height: 28px;
    }
    
    .vcr-rh-grid-pos {
        font-size: 11px;
        min-width: 24px;
    }
    
    .vcr-rh-grid-driver {
        font-size: 11px;
    }
    
    .vcr-rh-grid-car {
        font-size: 9px;
    }
    
    .vcr-rh-grid-lap {
        font-size: 10px;
    }
    
    .vcr-rh-grid-gap {
        font-size: 8px;
    }
    
    /* Category selector mobile */
    .vcr-rh-cat-pill {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }
    
    .vcr-rh-laps-table th,
    .vcr-rh-laps-table td {
        font-size: 10px !important;
        padding: 3px 4px !important;
    }
}

/* ─── Lap Detail Chevron ─── */
.vcr-rh-mc-chevron {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    color: #8b949e;
    transition: transform 0.2s, color 0.2s;
    line-height: 1;
    pointer-events: none;
    opacity: 0.6;
}

.vcr-rh-minicard-open .vcr-rh-mc-chevron {
    transform: translateX(-50%) rotate(180deg);
    color: #8b949e;
}

/* ─── Lap Detail Panel ─── */
.vcr-rh-laps-panel {
    width: 100%;
    margin-top: 6px;
    border-top: 1px solid #21262d;
    padding-top: 6px;
}

.vcr-rh-laps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.vcr-rh-laps-table th {
    color: #8b949e;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 4px 6px;
    border-bottom: 1px solid #30363d;
    text-align: right;
}

.vcr-rh-laps-table th:first-child {
    text-align: center;
    width: 32px;
}

.vcr-rh-laps-table td {
    padding: 3px 6px;
    color: #c9d1d9;
    text-align: right;
    border-bottom: 1px solid #161b2233;
}

.vcr-rh-laps-table td:first-child {
    text-align: center;
    color: #8b949e;
    font-weight: 600;
}

.vcr-rh-laps-table tbody tr:hover {
    background: #161b2266;
}

/* Invalid lap — red text */
.vcr-rh-laps-table tr.vcr-rh-lap-invalid td {
    color: #f85149;
    opacity: 0.7;
}

/* Best sector / best lap — fuchsia */
.vcr-rh-laps-table td.vcr-rh-lap-best {
    color: #e040fb;
    font-weight: 700;
}

/* ─── Premium Gate — Free-user content restrictions ─── */

/* Filters overlay for free users */
.vcr-rh-filters-body.vcr-rh-gated {
    position: relative;
    pointer-events: none;
    user-select: none;
    min-height: 80px;
}
.vcr-rh-filters-body.vcr-rh-gated::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 17, 23, 0.75);
    backdrop-filter: blur(2px);
    border-radius: 0 0 10px 10px;
    z-index: 5;
}
.vcr-rh-gate-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #b8860b44, #ffd70022);
    border: 1px solid #ffd70044;
    border-radius: 10px;
    padding: 10px 20px;
    color: #ffd700;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}
.vcr-rh-gate-label svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* Tab content gate (Qualifying, Penalties) */
.vcr-rh-tab-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 20px;
    text-align: center;
    color: #8b949e;
}
.vcr-rh-tab-gate-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b8860b22, #ffd70011);
    border: 1px solid #ffd70033;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vcr-rh-tab-gate-icon svg {
    color: #ffd700;
}
.vcr-rh-tab-gate-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffd700;
}
.vcr-rh-tab-gate-sub {
    font-size: 12px;
    color: #8b949e;
    max-width: 280px;
    line-height: 1.5;
}

/* Timing column premium badge (replaces gap/bestlap in minicards) */
.vcr-rh-mc-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #b8860b22, #ffd70011);
    border: 1px solid #ffd70033;
    border-radius: 6px;
    padding: 3px 8px;
    color: #ffd700;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.3;
}
.vcr-rh-mc-premium-badge svg {
    flex-shrink: 0;
}

/* Lap detail gate (replaces lap table inside expanded minicard) */
.vcr-rh-laps-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    color: #ffd700;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #b8860b11, #ffd70008);
    border-radius: 6px;
    margin: 4px 0;
}
.vcr-rh-laps-gate svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Premium-highlighted tab buttons (Qualifying, Penalties for free users) */
.vcr-rh-modal-tab.vcr-rh-premium-tab {
    background: #ffd700 !important;
    color: #1a202c !important;
    font-weight: 700 !important;
    border-color: #ffd700 !important;
    border-bottom-color: #ffd700 !important;
}
.vcr-rh-modal-tab.vcr-rh-premium-tab:hover {
    background: #e6c200 !important;
    color: #1a202c !important;
}
.vcr-rh-modal-tab.vcr-rh-premium-tab.active {
    background: #ffd700 !important;
    color: #1a202c !important;
    border-bottom-color: #ffd700 !important;
}

/* Qualifying grid time gate */
.vcr-rh-grid-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #b8860b22, #ffd70011);
    border: 1px solid #ffd70033;
    border-radius: 6px;
    padding: 2px 6px;
    color: #ffd700;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.vcr-rh-official-notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(236, 201, 75, 0.45);
    border-radius: 10px;
    background: rgba(236, 201, 75, 0.12);
    color: #f6e6a7;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.vcr-rh-source-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
}

.vcr-rh-source-notice-official {
    border: 1px solid rgba(34, 197, 94, 0.38);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.vcr-rh-source-notice-timing {
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: rgba(96, 165, 250, 0.11);
    color: #bfdbfe;
}

.vcr-rh-source-notice-manual {
    border: 1px solid rgba(251, 146, 60, 0.42);
    background: rgba(251, 146, 60, 0.13);
    color: #fed7aa;
}

.vcr-rh-source-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.vcr-rh-source-text {
    color: inherit;
    opacity: 0.92;
}

.vcr-rh-team-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vcr-rh-team-results-note {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(96, 165, 250, 0.09);
    color: #bfdbfe;
    font-size: 12px;
    line-height: 1.4;
}

.vcr-rh-team-card {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
    overflow: hidden;
    cursor: pointer;
}

.vcr-rh-team-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
}

.vcr-rh-team-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(236, 201, 75, 0.18);
    color: #f6e6a7;
    font-size: 16px;
    font-weight: 900;
}

.vcr-rh-team-name {
    flex: 1;
    min-width: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcr-rh-team-total {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.vcr-rh-team-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color: #a0aec0;
    background: rgba(255,255,255,0.06);
    transition: transform 0.18s ease;
}

.vcr-rh-team-card-open .vcr-rh-team-chevron {
    transform: rotate(180deg);
    color: #ecc94b;
}

.vcr-rh-team-expand {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.12);
}

.vcr-rh-team-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.vcr-rh-team-detail-metric {
    padding: 9px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
}

.vcr-rh-team-detail-metric span,
.vcr-rh-team-detail-metric small {
    display: block;
}

.vcr-rh-team-detail-metric span {
    color: #a0aec0;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vcr-rh-team-detail-metric strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 18px;
}

.vcr-rh-team-detail-metric small {
    margin-top: 2px;
    color: #718096;
    font-size: 10px;
}

.vcr-rh-team-breakdown {
    margin-top: 10px;
}

.vcr-rh-team-breakdown-title {
    margin: 4px 0 8px;
    color: #ecc94b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vcr-rh-team-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.35;
}

.vcr-rh-team-breakdown-row + .vcr-rh-team-breakdown-row {
    margin-top: 6px;
}

.vcr-rh-team-breakdown-row strong {
    color: #fff;
    font-weight: 900;
    white-space: nowrap;
}
