/* ============================================================
   BSB MECCA — CSS extracted from page-riders.php
   Externalized Session 4 (2026-04-21) for caching across page views.
   ============================================================ */

/* --- block 0 from page-riders.php --- */
/* ============================================================
   MOTORESULTS — RIDERS INDEX PAGE
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Barlow+Condensed:wght@400;600;700;800;900&family=DM+Sans:wght@300;400;500;600;700&display=swap');

html, body { background: #F5F3EE !important; }

.mr-riders-page {
    --accent:    #C8102E;
    --accent-hover: #B84008;
    --border:    #CCCCCC;
    --text:      #1A1A1A;
    --text-sec:  #444444;
    --text-muted:#888888;
    --bg:        #F5F3EE;
    --card-bg:   #FFFFFF;
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 80vh;
}

/* HEADER */
.mr-riders-header {
    background: var(--bg);
    border-bottom: 2px solid #1A1A1A;
    padding: 32px 24px;
}
.mr-riders-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}
.mr-riders-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -1px;
    color: #1A1A1A;
    margin: 0 0 4px;
    line-height: 1;
}
.mr-riders-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}
.mr-riders-search-wrap {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.mr-riders-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 0 14px;
    min-width: 240px;
    transition: border-color .15s;
}
.mr-riders-search-box:focus-within { border-color: var(--accent); }
.mr-riders-search-box svg { color: var(--text-muted); flex-shrink: 0; }
.mr-riders-search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 0;
    width: 100%;
}
.mr-riders-search-box input::placeholder { color: var(--text-muted); }
.mr-riders-select {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 0;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.mr-riders-select:focus { border-color: var(--accent); }

/* SECTIONS */
.mr-riders-section { padding: 40px 24px; }
.mr-riders-section--table { background: var(--card-bg); border-top: 1px solid var(--border); }
.mr-riders-section-inner { max-width: 1280px; margin: 0 auto; }
.mr-riders-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1A1A1A;
}
.mr-riders-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1A1A1A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mr-riders-section-accent {
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 0;
    flex-shrink: 0;
}
.mr-riders-section-count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: auto;
}

/* CHAMPION CARDS GRID */
.mr-riders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.mr-rider-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color .15s, transform .15s;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
}
.mr-rider-card--link:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.mr-rider-card--link:hover .mr-rider-card-arrow { opacity: 1; }

/* Photo area */
.mr-rider-card-photo {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, #E8E6E1 0%, #D9D7D2 100%);
    overflow: hidden;
    flex-shrink: 0;
}
.mr-rider-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .3s ease, filter .3s ease;
}
.mr-rider-card--link {
    transition: box-shadow .25s ease, transform .25s ease;
}
.mr-rider-card--link:hover {
    box-shadow: 0 8px 28px rgba(217,80,10,0.18), 0 2px 6px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.mr-rider-card--link:hover .mr-rider-card-photo img {
    transform: scale(1.06);
    filter: saturate(1.15) brightness(1.05);
}
.mr-rider-card-silhouette {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
}
.mr-rider-card-silhouette svg { width: 60px; height: 75px; }

/* Titles badge */
.mr-rider-card-titles {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(217,80,10,0.9);
    backdrop-filter: blur(4px);
    border-radius: 0;
    padding: 4px 8px;
    text-align: center;
    line-height: 1;
}
.mr-rider-card-titles-num {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.mr-rider-card-titles-lbl {
    display: block;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.85);
}

/* Card info */
.mr-rider-card-info {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mr-rider-card-name-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.mr-rider-card-name {
    font-weight: 700;
    font-size: 14px;
    color: #1A1A1A;
    line-height: 1.2;
}
.mr-rider-card-lineage {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mr-rider-card-stats {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.mr-rider-card-stat { text-align: left; }
.mr-rider-card-stat-val {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #1A1A1A;
    line-height: 1;
}
.mr-rider-card-stat-lbl {
    display: block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-top: 2px;
}
.mr-rider-card-bar-track {
    height: 2px;
    background: #CCCCCC;
    border-radius: 0;
    overflow: hidden;
    margin-top: 8px;
}
.mr-rider-card-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 0;
    transition: width .4s ease;
}
.mr-rider-card-arrow {
    position: absolute;
    bottom: 14px;
    right: 14px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity .15s;
}

/* A-Z NAV + PAGINATED TABLE (new server-rendered bottom section) */
.rdr-az { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; padding: 14px 0; margin: 18px 0 28px; border-top: 1px dotted #888; border-bottom: 1px dotted #888; }
.rdr-az-btn { font-family: 'Barlow Condensed',sans-serif; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #444; padding: 6px 11px; text-decoration: none; min-width: 34px; text-align: center; transition: color .15s; display: inline-block; }
.rdr-az-btn:hover { color: #C8102E; }
.rdr-az-btn.active { color: #F5F3EE; background: #C8102E; }
.rdr-az-btn.disabled { color: #CCC; pointer-events: none; }

.rdr-table { width: 100%; border-collapse: collapse; font-family: 'DM Sans',sans-serif; margin-top: 8px; }
.rdr-table th { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #888; text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid #1A1A1A; }
.rdr-table th.rdr-num { text-align: right; }
.rdr-table td { padding: 8px 12px 8px 0; font-size: 0.9375rem; color: #1A1A1A; background-image: linear-gradient(to right, #1A1A1A 24%, transparent 0%); background-position: bottom; background-size: 4px 1px; background-repeat: repeat-x; vertical-align: middle; }
.rdr-table td.rdr-num { text-align: right; font-variant-numeric: tabular-nums; }
.rdr-table tr:last-child td { background: none; }
.rdr-col-pic { width: 48px; }
.rdr-col-nat { width: 140px; white-space: nowrap; }
.rdr-col-titles, .rdr-col-wins { width: 90px; }
.rdr-thumb { display: block; width: 40px; height: 40px; overflow: hidden; background: #EFE9DC; }
.rdr-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .3s ease, filter .3s ease; }
tr:hover .rdr-thumb img { transform: scale(1.05); filter: saturate(1.15) brightness(1.05); }
tr:hover { background: linear-gradient(90deg, rgba(217,80,10,0.06), transparent 80%); }
.rdr-thumb-empty { background: #EFE9DC; }
.rdr-row-name { color: #1A1A1A; text-decoration: none; font-family: 'Playfair Display',serif; font-size: 1.0625rem; }
.rdr-row-name:hover { color: #C8102E; }
.rdr-muted { color: #CCC; }
.rdr-empty { padding: 3rem; text-align: center; font-family: 'Playfair Display',serif; font-style: italic; color: #888; }
.rdr-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #1A1A1A; }
.rdr-page-nums { display: flex; align-items: center; gap: 4px; }
.rdr-page-num { font-family: 'Barlow Condensed',sans-serif; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.06em; color: #444; padding: 6px 10px; min-width: 30px; text-align: center; text-decoration: none; }
.rdr-page-num:hover { color: #C8102E; }
.rdr-page-num.active { color: #F5F3EE; background: #C8102E; }
.rdr-page-ellipsis { color: #CCC; padding: 0 4px; }
.rdr-page-btn { font-family: 'Barlow Condensed',sans-serif; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #444; text-decoration: none; padding: 8px 12px; border-bottom: 2px solid transparent; }
.rdr-page-btn:hover { color: #C8102E; border-bottom-color: #C8102E; }
.rdr-page-btn.disabled { color: #CCC; pointer-events: none; }
@media (max-width: 640px) { .rdr-col-pic, .rdr-col-nat { display: none; } }

/* ALL RIDERS TABLE */
.mr-riders-table-wrap { overflow-x: auto; }
.mr-riders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.mr-riders-table th {
    background: var(--bg);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid #1A1A1A;
    position: sticky;
    top: 56px;
    z-index: 1;
}
.mr-riders-table td {
    padding: 9px 14px;
    border-bottom: none;
    background-image: linear-gradient(to right, #1A1A1A 24%, transparent 0%);
    background-position: bottom;
    background-size: 4px 1px;
    background-repeat: repeat-x;
    color: var(--text);
    vertical-align: middle;
}
.mr-riders-table tbody tr:hover { background: rgba(217,80,10,0.04); }
.mr-riders-table tbody tr.mr-rider-row--champion td:first-child {
    border-left: 2px solid var(--accent);
}
.mr-riders-table tbody tr.mr-rider-row--champion .mr-rider-table-name { font-weight: 600; }
.mr-rider-table-link { color: var(--text); text-decoration: none; }
.mr-rider-table-link:hover { color: var(--accent); text-decoration: underline; }
.mr-rider-table-name { font-weight: 500; }
.mr-rider-table-champ-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    background: rgba(217,80,10,0.08);
    border: 1px solid rgba(217,80,10,0.25);
    color: var(--accent);
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 0.3px;
}
.mr-riders-table-loading {
    text-align: center;
    padding: 48px;
}
.mr-riders-spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: mr-spin .8s linear infinite;
    margin: 0 auto;
}
@keyframes mr-spin { to { transform: rotate(360deg); } }

.mr-riders-load-more {
    display: block;
    margin: 24px auto 0;
    padding: 10px 28px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
    transition: all .15s;
}
.mr-riders-load-more:hover {
    background: var(--bg);
    border-color: var(--accent);
    color: var(--accent);
}
.mr-riders-no-results {
    padding: 48px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
.mr-riders-nat { font-size: 11px; font-weight: 700; opacity: .6; }

/* Ensure theme in WP */
#page, .site-main, body { background: #F5F3EE !important; }
.entry-content { background: transparent; padding: 0; }
.mr-riders-page a { color: inherit; }

@media (max-width: 640px) {
    .mr-riders-header-inner { flex-direction: column; align-items: flex-start; }
    .mr-riders-search-wrap { width: 100%; }
    .mr-riders-search-box { min-width: 0; flex: 1; }
    .mr-riders-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .mr-rider-card-photo { height: 120px; }
}
