/* ============================================================
   Endurotech iRacing Drivers — Frontend Styles v1.9.9
   ============================================================ */

/* ----------------------------------------------------------
   CSS custom properties — EDR yellow accent, pure black bg
   Override via shortcode attribute or admin style editor.
   ---------------------------------------------------------- */
.edr-drivers-wrap {
    --edr-accent:       #f0f000;
    --edr-accent-dim:   rgba(240,240,0,.15);
    --edr-accent-hover: rgba(240,240,0,.07);
    --edr-bg:           #0a0a0a;
    --edr-bg-card:      #111111;
    --edr-bg-card2:     #0d0d0d;
    --edr-bg-stat:      #0d0d0d;
    --edr-border:       #222222;
    --edr-text:         #e0e0e0;
    --edr-text-muted:   #aaaaaa;
    --edr-text-dim:     #555555;
    --edr-radius:       0px;
    --edr-radius-sm:    0px;
    --edr-transition:   .2s ease;
    --edr-ticker-speed: 60s;
    --edr-max-width:    100%;
    background:  var(--edr-bg);
    color:       var(--edr-text);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size:   16px;
    line-height: 1.75;
    padding:     0;
    max-width:   var(--edr-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Preset accent overrides */
.edr-drivers-wrap.edr-accent-red   { --edr-accent:#e63946; --edr-accent-dim:rgba(230,57,70,.15);  --edr-accent-hover:rgba(230,57,70,.07); }
.edr-drivers-wrap.edr-accent-blue  { --edr-accent:#2196f3; --edr-accent-dim:rgba(33,150,243,.15); --edr-accent-hover:rgba(33,150,243,.07); }
.edr-drivers-wrap.edr-accent-green { --edr-accent:#2ecc71; --edr-accent-dim:rgba(46,204,113,.15); --edr-accent-hover:rgba(46,204,113,.07); }

/* ----------------------------------------------------------
   Demo banner
   ---------------------------------------------------------- */
.edr-demo-banner {
    background:    rgba(241,196,15,.08);
    border:        1px solid rgba(241,196,15,.3);
    border-left:   4px solid var(--edr-accent);
    color:         var(--edr-accent);
    padding:       10px 16px;
    border-radius: var(--edr-radius-sm);
    font-size:     .82rem;
    margin-bottom: 24px;
    text-align:    center;
}
.edr-demo-banner code {
    background:    rgba(255,255,255,.08);
    padding:       1px 5px;
    border-radius: 3px;
    font-size:     .78rem;
}

/* ----------------------------------------------------------
   Notice
   ---------------------------------------------------------- */
.edr-drivers-notice {
    background:    var(--edr-bg-card);
    border:        1px solid var(--edr-border);
    border-left:   4px solid var(--edr-accent);
    padding:       14px 20px;
    border-radius: var(--edr-radius-sm);
    color:         var(--edr-text);
    font-size:     .9rem;
}
.edr-drivers-notice a { color: var(--edr-accent); }

/* ----------------------------------------------------------
   Header — centred for balance on wide layouts; reads as a hero block
   ---------------------------------------------------------- */
.edr-drivers-header {
    padding:       60px 48px 32px;
    border-top:    1px solid var(--edr-border);
    text-align:    center;
    max-width:     52rem;
    margin-left:   auto;
    margin-right:  auto;
    box-sizing:    border-box;
}
.edr-section-label {
    font-size:      11px;
    color:          var(--edr-accent);
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: .16em;
    margin-bottom:  10px;
}
.edr-section-heading {
    font-size:      clamp(22px, 3vw, 34px);
    font-weight:    800;
    color:          #ffffff;
    letter-spacing: -.02em;
    margin:         0 0 12px;
    line-height:    1.2;
}
.edr-drivers-subtitle {
    font-size:   clamp(15px, 2vw, 17px);
    color:       var(--edr-text-muted);
    line-height: 1.75;
    margin:      0 auto;
    max-width:   36rem;
}
@media (max-width: 900px) { .edr-drivers-header { padding: 48px 32px 24px; max-width: none; } }
@media (max-width: 600px) {
    .edr-drivers-header {
        padding:    40px 20px 20px;
        text-align: center;
    }
    .edr-drivers-subtitle { max-width: none; }
}

/* ----------------------------------------------------------
   Summary stat bar — matches site .abt-facts pattern
   ---------------------------------------------------------- */
.edr-drivers-stats-bar {
    display:    grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--edr-bg-card);
    border-top: 1px solid var(--edr-border);
    border-bottom: 1px solid var(--edr-border);
    margin-bottom: 0;
}
.edr-stat-card {
    padding:        28px 20px;
    text-align:     center;
    border-right:   1px solid var(--edr-border);
    display:        flex;
    flex-direction: column;
    gap:            6px;
}
.edr-stat-card:last-child { border-right: none; }
.edr-stat-value {
    font-size:   clamp(22px, 4vw, 32px);
    font-weight: 800;
    color:       var(--edr-accent);
    line-height: 1;
}
.edr-stat-label {
    font-size:      11px;
    text-transform: uppercase;
    letter-spacing: .10em;
    color:          var(--edr-text-muted);
    margin-top:     4px;
}

/* ----------------------------------------------------------
   Role filter bar
   ---------------------------------------------------------- */
.edr-filter-bar {
    display:       flex;
    flex-wrap:     wrap;
    gap:           8px;
    padding:       20px 48px;
    border-top:    1px solid var(--edr-border);
    border-bottom: 1px solid var(--edr-border);
    margin-bottom: 0;
}
.edr-filter-btn {
    background:    transparent;
    border:        1px solid var(--edr-border);
    color:         var(--edr-text-muted);
    padding:       6px 16px;
    border-radius: 50px;
    font-size:     .78rem;
    font-weight:   600;
    letter-spacing:.04em;
    cursor:        pointer;
    transition:    background var(--edr-transition), border-color var(--edr-transition), color var(--edr-transition);
}
.edr-filter-btn:hover,
.edr-filter-btn.edr-filter-active {
    background:    var(--edr-accent-dim);
    border-color:  var(--edr-accent);
    color:         var(--edr-accent);
}

/* ----------------------------------------------------------
   Spotlight / featured driver section
   ---------------------------------------------------------- */
.edr-spotlight-section {
    display:       flex;
    flex-direction: column;
    gap:           16px;
    margin-bottom: 32px;
}
.edr-spotlight-card {
    display:        flex;
    gap:            0;
    background:     var(--edr-bg-card);
    border:         1px solid var(--edr-border);
    border-left:    4px solid var(--edr-accent);
    border-radius:  var(--edr-radius);
    overflow:       hidden;
    position:       relative;
}
.edr-spotlight-photo {
    width:      220px;
    min-height: 240px;
    flex-shrink: 0;
    overflow:   hidden;
}
.edr-spotlight-photo img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
}
.edr-spotlight-info {
    flex:    1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap:     8px;
    justify-content: center;
}
.edr-spotlight-meta {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         8px;
    margin-bottom: 4px;
}
.edr-spotlight-num {
    font-size:   .85rem !important;
    padding:     3px 10px !important;
}
.edr-spotlight-label {
    font-size:      .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color:          var(--edr-accent);
    font-weight:    700;
}
.edr-spotlight-name {
    font-size:      2rem;
    font-weight:    800;
    color:          #fff;
    margin:         0;
    letter-spacing: -.02em;
    line-height:    1.1;
}
.edr-spotlight-tagline {
    font-size:     .9rem;
    color:         var(--edr-text-muted);
    font-style:    italic;
    margin:        0;
    overflow:      hidden;
    display:       -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp:    2;
    line-height:   1.35;
}
.edr-spotlight-tagline:empty { display: none; }
.edr-spotlight-stats {
    display:     flex;
    gap:         28px;
    margin-top:  12px;
    flex-wrap:   wrap;
}
.edr-spotlight-stat {
    display:        flex;
    flex-direction: column;
    gap:            2px;
}
.edr-spotlight-stat-val {
    font-size:   1.6rem;
    font-weight: 800;
    color:       #fff;
    line-height: 1;
}
.edr-spotlight-stat-lbl {
    font-size:      .68rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color:          var(--edr-text-muted);
}

/* ----------------------------------------------------------
   Card grid — section padding matching site
   ---------------------------------------------------------- */
.edr-cards-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap:                   20px;
    padding:               32px 48px;
    margin-bottom:         0;
}
.edr-cards-grid.edr-cols-1 { grid-template-columns: 1fr; }
.edr-cards-grid.edr-cols-2 { grid-template-columns: repeat(2, 1fr); }
.edr-cards-grid.edr-cols-3 { grid-template-columns: repeat(3, 1fr); }
.edr-cards-grid.edr-cols-4 { grid-template-columns: repeat(4, 1fr); }
.edr-cards-grid > .edr-driver-card {
    height: 100%;
}

/* ----------------------------------------------------------
   Individual driver card — base
   ---------------------------------------------------------- */
.edr-driver-card {
    background:    var(--edr-bg-card);
    border:        1px solid var(--edr-border);
    border-radius: var(--edr-radius);
    overflow:      hidden;
    display:       flex;
    flex-direction: column;
    transition:    background var(--edr-transition), border-color var(--edr-transition);
}
.edr-driver-card:hover {
    background:   #161616;
    border-color: #333;
}

/* ----------------------------------------------------------
   3D flip card
   ---------------------------------------------------------- */
.edr-driver-card.edr-flippable {
    perspective: 1200px;
    overflow:    visible;
    background:  transparent;
    border:      none;
    box-shadow:  none;
    transform:   none !important;
}
.edr-driver-card.edr-flippable:hover { background: transparent; }
.edr-card-inner {
    position:         relative;
    width:            100%;
    height:           100%;
    transform-style:  preserve-3d;
    transition:       transform 0.55s cubic-bezier(.4,.2,.2,1);
}
.edr-card-front {
    display:             flex;
    flex-direction:      column;
    height:              100%;
    background:          var(--edr-bg-card);
    border:              none;
    border-radius:       var(--edr-radius);
    overflow:            hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition:          background var(--edr-transition);
}
.edr-driver-card.edr-flippable:hover .edr-card-front { background: #161616; }
.edr-driver-card.edr-flippable:hover .edr-card-inner { transform: rotateY(180deg); }
.edr-card-back {
    position:            absolute;
    inset:               0;
    background:          #161616;
    border:              none;
    border-left:         3px solid var(--edr-accent);
    border-radius:       var(--edr-radius);
    overflow-y:          auto;
    transform:           rotateY(180deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.edr-card-back-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    box-sizing: border-box;
}
.edr-card-back-name {
    font-size:      1.1rem;
    font-weight:    700;
    color:          #fff;
    margin:         0;
    letter-spacing: -.01em;
}
.edr-back-nat {
    display: block;
}
.edr-back-tagline {
    color:         var(--edr-text-muted);
    font-style:    italic;
    margin:        0;
    overflow:      hidden;
    display:       -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp:    2;
    line-height:   1.35;
}
.edr-back-stat-row {
    display:     flex;
    flex-wrap:   wrap;
    align-items: center;
    gap:         8px;
    font-size:   .82rem;
    font-weight: 700;
    color:       var(--edr-accent);
}
.edr-back-gear,
.edr-back-last-race {
    border-top: 1px solid var(--edr-border);
    padding-top: 10px;
}
.edr-card-front-actions {
    margin-top:  auto;
    padding:     12px 16px 14px;
}
.edr-card-back-actions {
    margin-top: auto;
    padding-top: 4px;
}
.edr-card-flip-btn {
    display:       block;
    width:         100%;
    box-sizing:    border-box;
    margin:        0;
    padding:       8px 12px;
    font-size:     .72rem;
    font-weight:   700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color:         #000;
    background:    var(--edr-accent);
    border:        1px solid var(--edr-accent);
    border-radius: 4px;
    cursor:        pointer;
    transition:    background var(--edr-transition), color var(--edr-transition), border-color var(--edr-transition);
}
.edr-card-flip-btn:hover,
.edr-card-flip-btn:focus-visible {
    background:    transparent;
    color:         var(--edr-accent);
    outline:       none;
}
.edr-card-flip-back {
    background:    transparent;
    color:         var(--edr-accent);
    border-color:  var(--edr-border);
}
.edr-card-flip-back:hover,
.edr-card-flip-back:focus-visible {
    background:    var(--edr-accent-dim);
    color:         var(--edr-accent);
    border-color:  var(--edr-accent);
}
.edr-flip-hint {
    margin-top: 8px;
    margin-bottom: 0;
    font-size:  .68rem;
    color:      var(--edr-text-dim);
    text-align: center;
    letter-spacing: .04em;
}

/* Non-flip card — keep overflow hidden for clean look */
.edr-driver-card:not(.edr-flippable) {
    overflow: hidden;
}

/* Mobile: tap-to-flip replaces hover */
.edr-driver-card.edr-flippable.edr-flipped .edr-card-inner { transform: rotateY(180deg); }
@media (hover: none) {
    /* On touch devices hover doesn't fire — use .edr-flipped class toggled by JS */
    .edr-driver-card.edr-flippable:hover .edr-card-inner { transform: none; }
    .edr-driver-card.edr-flippable.edr-flipped .edr-card-inner { transform: rotateY(180deg); }
    .edr-flip-hint::after { content: ' (tap to flip)'; }
}

/* ----------------------------------------------------------
   Card top — photo + identity
   Photo is a fixed square thumbnail; identity fills remaining width.
   ---------------------------------------------------------- */
.edr-card-top {
    display:     flex;
    align-items: flex-start;
    gap:         0;
}
.edr-card-photo {
    width:           80px;
    height:          80px;
    flex-shrink:     0;
    overflow:        hidden;
    background:      #111;
    border-radius:   6px;
    margin:          14px 0 0 14px;
}
.edr-card-photo--empty {
    background:      #1a1a1a;
}
.edr-card-photo img {
    width:           100%;
    height:          100%;
    object-fit:      cover;
    object-position: center top;
    display:         block;
}
.edr-card-identity {
    flex:       1;
    padding:    14px 16px 12px;
    display:    flex;
    flex-direction: column;
    gap:        3px;
    min-width:  0;
}
.edr-card-meta-row {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         6px;
    margin-bottom: 4px;
}
.edr-card-rank {
    font-size:      .72rem;
    color:          var(--edr-text-dim);
    font-weight:    600;
    letter-spacing: .04em;
    margin-right:   2px;
}
.edr-driver-number {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    background:      var(--edr-accent);
    color:           #000;
    font-size:       .72rem;
    font-weight:     800;
    letter-spacing:  .02em;
    padding:         1px 7px;
    border-radius:   4px;
    line-height:     1.6;
}

/* Role badges — sharp, site-matching style */
.edr-role-badge {
    display:        inline-block;
    font-size:      .63rem;
    font-weight:    700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding:        2px 8px;
    border-radius:  0;
    line-height:    1.7;
    white-space:    nowrap;
}
.edr-role-captain { background: #c9920f; color: #000; }
.edr-role-lead    { background: var(--edr-accent); color: #000; }
.edr-role-pro     { background: #2196f3; color: #fff; }
.edr-role-silver  { background: #607d8b; color: #fff; }
.edr-role-bronze  { background: #bf6b1a; color: #fff; }
.edr-role-reserve { background: transparent; color: var(--edr-text-muted); border: 1px solid var(--edr-border); }
.edr-role-academy { background: #2ecc71; color: #0b2e1a; }
.edr-role-inactive {
    background:    transparent;
    color:         var(--edr-text-muted);
    border:        1px dashed var(--edr-border);
}

/* Recently active dot */
.edr-active-dot {
    display:       inline-block;
    width:         8px;
    height:        8px;
    border-radius: 50%;
    background:    #2ecc71;
    box-shadow:    0 0 6px rgba(46,204,113,.6);
    flex-shrink:   0;
}

/* Driver name */
.edr-card-name {
    font-size:     1.05rem;
    font-weight:   700;
    color:         #fff;
    margin:        0;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

/* Nationality + tagline */
.edr-driver-nat {
    font-size:     .75rem;
    color:         var(--edr-text-muted);
    display:       block;
    line-height:   1.35;
}
.edr-driver-nat:empty { display: none; }
.edr-driver-tagline {
    font-size:     .76rem;
    color:         var(--edr-text-muted);
    font-style:    italic;
    margin:        0;
    overflow:      hidden;
    display:       -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp:    2;
    line-height:   1.35;
}
.edr-driver-tagline:empty { display: none; }

/* iRating / SR badges */
.edr-card-badges {
    display:    flex;
    flex-wrap:  wrap;
    align-items: center;
    gap:        6px;
    margin-top: 6px;
}
.edr-irating-badge {
    display:        inline-flex;
    align-items:    baseline;
    gap:            0.28em;
    background:     var(--edr-accent-dim);
    color:          var(--edr-accent);
    border:         1px solid var(--edr-accent);
    font-size:      .72rem;
    font-weight:    700;
    padding:        2px 8px;
    border-radius:  0;
    letter-spacing: .04em;
}
/* Plain: inline iR + number (matches card back — no chip/box) */
.edr-irating-badge--plain {
    background:     transparent;
    border:         none;
    padding:        0;
    color:          inherit;
}
.edr-card-badges .edr-irating-badge--plain {
    color:          var(--edr-accent);
    font-size:      .82rem;
}
.edr-back-stat-row .edr-irating-badge--plain {
    color:          inherit;
}
.edr-ir-prefix {
    font-weight:    700;
}
.edr-ir-num {
    font-weight:    700;
}
/* Combined SR + license badge — e.g. "4.6 B" */
.edr-sr-lic-badge {
    display:        inline-flex;
    align-items:    center;
    gap:            0;
    font-size:      .75rem;
    font-weight:    800;
    border-radius:  3px;
    overflow:       hidden;
    letter-spacing: .02em;
    line-height:    1;
}
.edr-sr-lic-badge .edr-sr-val {
    padding: 3px 7px;
    opacity: .92;
}
.edr-sr-lic-badge .edr-lic-letter {
    padding:    3px 6px 3px 4px;
    font-weight: 900;
    font-size:  .7rem;
    opacity:    1;
    border-left: 1px solid rgba(0,0,0,.2);
}
/* iRacing license class colours — solid fill like iRacing UI */
.edr-lic-r   { background: #c0392b; color: #fff; }
.edr-lic-d   { background: #e67e22; color: #fff; }
.edr-lic-c   { background: #d4ac0d; color: #111; }
.edr-lic-b   { background: #27ae60; color: #fff; }
.edr-lic-a   { background: #2980b9; color: #fff; }
.edr-lic-pro { background: #7f8c8d; color: #fff; }

/* Standalone SR badge (fallback / future use) */
.edr-sr-badge {
    font-size:      .72rem;
    font-weight:    700;
    padding:        2px 8px;
    border-radius:  3px;
    letter-spacing: .03em;
}

/* iRating trend badge */
.edr-trend {
    font-size:      .68rem;
    font-weight:    700;
    padding:        2px 6px;
    border-radius:  0;
    letter-spacing: .02em;
}
.edr-trend-up   { background: rgba(46,204,113,.12); color: #2ecc71; border: 1px solid rgba(46,204,113,.3); }
.edr-trend-down { background: rgba(230,57,70,.12);  color: #e63946; border: 1px solid rgba(230,57,70,.3); }

/* ----------------------------------------------------------
   Stats row
   ---------------------------------------------------------- */
.edr-card-stats {
    display:    flex;
    border-top: 1px solid var(--edr-border);
    background: var(--edr-bg-card2);
}
.edr-card-stat {
    flex:           1;
    display:        flex;
    flex-direction: column;
    align-items:    center;
    padding:        10px 6px;
    border-right:   1px solid var(--edr-border);
}
.edr-card-stat:last-child { border-right: none; }
.edr-card-stat-val {
    font-size:   1.05rem;
    font-weight: 700;
    color:       #fff;
    line-height: 1;
}
.edr-card-stat-lbl {
    font-size:      .65rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color:          var(--edr-text-muted);
    margin-top:     4px;
}

/* ----------------------------------------------------------
   Last race strip
   ---------------------------------------------------------- */
.edr-card-lastrace {
    display:     flex;
    align-items: center;
    gap:         10px;
    padding:     10px 16px;
    border-top:  1px solid var(--edr-border);
    background:  var(--edr-bg-card2);
}
.edr-lastrace-pos {
    font-size:   1.1rem;
    font-weight: 800;
    color:       var(--edr-accent);
    flex-shrink: 0;
    min-width:   28px;
}
.edr-lastrace-detail {
    font-size:     .78rem;
    color:         var(--edr-text-muted);
    line-height:   1.4;
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
    display:       flex;
    flex-direction: column;
}
.edr-lastrace-detail small {
    font-size:     .7rem;
    color:         var(--edr-text-dim);
    display:       block;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

/* ----------------------------------------------------------
   Gear / sim setup
   ---------------------------------------------------------- */
.edr-card-gear {
    border-top: 1px solid var(--edr-border);
    padding:    14px 16px;
    background: rgba(0,0,0,.2);
}
.edr-gear-heading {
    display:        block;
    font-size:      .66rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color:          var(--edr-text-dim);
    margin-bottom:  10px;
}
.edr-gear-list {
    display:        flex;
    flex-direction: column;
    gap:            5px;
}
.edr-gear-item {
    display:     flex;
    gap:         8px;
    font-size:   .76rem;
    align-items: baseline;
}
.edr-gear-label {
    color:          var(--edr-text-dim);
    min-width:      56px;
    flex-shrink:    0;
    font-size:      .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.edr-gear-value {
    color:       var(--edr-text);
    line-height: 1.4;
}

/* ----------------------------------------------------------
   Minimal card style
   ---------------------------------------------------------- */
.edr-cards-minimal .edr-driver-card {
    background:   transparent;
    border-color: var(--edr-border);
}
.edr-cards-minimal .edr-card-top    { padding: 14px 16px; }
.edr-cards-minimal .edr-card-identity { padding: 0; }
.edr-cards-minimal .edr-card-gear    { display: none; }
.edr-cards-minimal .edr-card-lastrace { display: none; }

/* ----------------------------------------------------------
   Race ticker
   ---------------------------------------------------------- */
.edr-ticker-wrap {
    display:       flex;
    align-items:   center;
    gap:           0;
    background:    var(--edr-bg-stat);
    border:        1px solid var(--edr-border);
    border-radius: var(--edr-radius-sm);
    overflow:      hidden;
    margin-top:    24px;
    height:        40px;
}
.edr-ticker-label {
    background:     var(--edr-accent);
    color:          #000;
    font-size:      .68rem;
    font-weight:    800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding:        0 14px;
    height:         100%;
    display:        flex;
    align-items:    center;
    white-space:    nowrap;
    flex-shrink:    0;
}
.edr-ticker-track {
    flex:     1;
    overflow: hidden;
    position: relative;
}
.edr-ticker-content {
    display:      inline-block;
    white-space:  nowrap;
    font-size:    .78rem;
    color:        var(--edr-text-muted);
    padding-left: 16px;
    animation:    edr-ticker-scroll var(--edr-ticker-speed, 60s) linear infinite;
}
@keyframes edr-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.edr-ticker-wrap:hover .edr-ticker-content { animation-play-state: paused; }

/* ----------------------------------------------------------
   Table layout — matching site dark pattern
   ---------------------------------------------------------- */
.edr-drivers-table-wrap {
    width:         100%;
    overflow-x:    auto;
    border-top:    1px solid var(--edr-border);
    border-bottom: 1px solid var(--edr-border);
}
.edr-drivers-table {
    width:           100%;
    border-collapse: collapse;
    font-size:       .88rem;
}
.edr-drivers-table thead th {
    background:     #000;
    color:          var(--edr-text-muted);
    font-size:      11px;
    text-transform: uppercase;
    letter-spacing: .10em;
    font-weight:    700;
    padding:        14px 20px;
    text-align:     left;
    border-bottom:  2px solid var(--edr-accent);
    white-space:    nowrap;
}
.edr-drivers-table tbody tr {
    border-bottom: 1px solid var(--edr-border);
    transition:    background var(--edr-transition);
}
.edr-drivers-table tbody tr:last-child { border-bottom: none; }
.edr-drivers-table tbody tr:hover { background: var(--edr-accent-hover); }
.edr-drivers-table tbody td {
    padding:        14px 20px;
    vertical-align: middle;
}
.edr-col-rank  { color: var(--edr-text-muted); font-size: .78rem; text-align: center; width: 36px; }
.edr-col-role  { width: 130px; }
.edr-col-name .edr-driver-name { font-weight: 600; color: #fff; display: block; }
.edr-col-name .edr-driver-nat-inline { font-size: .72rem; color: var(--edr-text-muted); }
.edr-col-ir, .edr-col-sr,
.edr-col-wins, .edr-col-starts,
.edr-col-top5, .edr-col-laps { text-align: center; white-space: nowrap; }
.edr-col-lastrace { min-width: 180px; }
.edr-lastrace-info { display: flex; align-items: center; gap: 8px; }
.edr-na { color: var(--edr-text-dim); }

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.edr-drivers-footer {
    font-size:      11px;
    color:          var(--edr-text-dim);
    text-align:     center;
    padding:        20px 0 32px;
    letter-spacing: .06em;
    border-top:     1px solid var(--edr-border);
    text-transform: uppercase;
}

/* ----------------------------------------------------------
   Animated counter — initial state for JS
   ---------------------------------------------------------- */
[data-counter].edr-counter-init { opacity: 0; }
[data-counter].edr-counter-done { opacity: 1; transition: opacity .3s; }

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    .edr-cards-grid.edr-cols-3,
    .edr-cards-grid.edr-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .edr-cards-grid            { padding: 24px 32px; gap: 16px; }
    .edr-spotlight-card        { flex-direction: column; }
    .edr-spotlight-photo       { width: 100%; min-height: 200px; max-height: 260px; }
    .edr-spotlight-name        { font-size: 1.5rem; }
    .edr-drivers-stats-bar     { grid-template-columns: repeat(3, 1fr); }
    .edr-stat-card:nth-child(3) { border-right: none; }
    .edr-stat-card:nth-child(4),
    .edr-stat-card:nth-child(5) { border-top: 1px solid var(--edr-border); }
}

@media (max-width: 600px) {
    .edr-cards-grid,
    .edr-cards-grid.edr-cols-2,
    .edr-cards-grid.edr-cols-3,
    .edr-cards-grid.edr-cols-4 { grid-template-columns: 1fr; }
    .edr-cards-grid             { padding: 20px 20px; gap: 16px; }
    .edr-drivers-stats-bar      { grid-template-columns: repeat(2, 1fr); }
    .edr-stat-card              { border-bottom: 1px solid var(--edr-border); }
    .edr-stat-card:nth-child(3) { border-right: 1px solid var(--edr-border); }
    .edr-stat-card:nth-child(even) { border-right: none; }
    /* Fifth stat (Total Laps): span both columns so it sits centred under the 2×2 grid */
    .edr-stat-card:nth-child(5) {
        grid-column:  1 / -1;
        border-right: none;
        border-bottom: none;
    }
    .edr-card-photo             { width: 64px; height: 64px; margin: 12px 0 0 12px; }
    .edr-card-name              { font-size: .95rem; }
    .edr-filter-bar             { gap: 6px; padding: 0 20px; justify-content: center; }
    .edr-filter-btn             { padding: 5px 12px; }
    .edr-spotlight-stats        { gap: 16px; }
    .edr-spotlight-stat-val     { font-size: 1.2rem; }
}
