/* ══════════════════════════════════════════
   Next To Jump v5 – Dark Navy Racing Theme
══════════════════════════════════════════ */

/* ── Section wrapper ── */
.ntj-section {
    background: #0d1b3e;
    padding: 36px 24px 32px;
    border-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
}

/* ── Hero ── */
.ntj-hero { margin-bottom: 28px; }
.ntj-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #e8c44a;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.ntj-eyebrow-dot {
    width: 7px; height: 7px;
    background: #e8c44a;
    border-radius: 50%;
    display: inline-block;
    animation: ntj-pulse 1.4s ease-in-out infinite;
}
.ntj-hero-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.2;
}
.ntj-hero-sub {
    font-size: 13px;
    color: #8a9bbf;
    line-height: 1.6;
    margin: 0;
    max-width: 520px;
}

/* ── Two-column row ── */
.ntj-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ── Cards shared ── */
.ntj-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    flex: 1 1 260px;
    min-width: 0;
    color: #111;
}
.ntj-card--list { flex: 1.6 1 340px; }
.ntj-card--fav  { flex: 1 1 260px; }

.ntj-card-header {
    background: #fff;
    padding: 14px 18px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.ntj-header-label {
    font-size: 14px;
    font-weight: 700;
    color: #111e40;
}
.ntj-header-count {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #111e40;
    background: #f0d060;
    border-radius: 20px;
    padding: 2px 10px;
}
.ntj-header-right {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #8a9bbf;
    letter-spacing: 0.5px;
    cursor: pointer;
}

/* ── Scrollable list ── */
.ntj-list-scroll {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}
.ntj-list-scroll::-webkit-scrollbar { width: 4px; }
.ntj-list-scroll::-webkit-scrollbar-track { background: transparent; }
.ntj-list-scroll::-webkit-scrollbar-thumb { background: #dde1ea; border-radius: 2px; }

/* ── Race rows (new design to match screenshot) ── */
.ntj-race-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    gap: 10px;
    border-top: 1px solid #f2f4f8;
    background: #fff;
    transition: background 0.12s;
    cursor: default;
}
.ntj-race-item:first-child { border-top: none; }
.ntj-race-item:hover { background: #f8f9fc; }
.ntj-race-item.ntj-next-up { background: #fff; }

.ntj-race-left   { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }

/* Track badge pill */
.ntj-track-badge {
    width: 42px; height: 42px;
    background: #111e40;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}
.ntj-track-badge--sm {
    width: 36px; height: 36px;
    font-size: 10px;
    border-radius: 8px;
}

.ntj-race-name {
    font-size: 14px;
    font-weight: 600;
    color: #111e40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ntj-race-meta {
    font-size: 12px;
    color: #8a9bbf;
    margin-top: 2px;
}

/* Right side: MTP + Bet */
.ntj-race-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.ntj-mtp-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
}
.ntj-mtp-label {
    font-size: 10px;
    color: #8a9bbf;
    font-weight: 700;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* ── Time badge ── */
.ntj-time-badge {
    font-size: 16px;
    font-weight: 800;
    color: #111e40;
}
.ntj-time-badge.ntj-urgent {
    color: #e74c3c;
    animation: ntj-pulse 1s ease-in-out infinite;
}
.ntj-time-badge.ntj-soon  { color: #111e40; }
.ntj-time-badge.ntj-later { color: #111e40; }

@keyframes ntj-pulse {
    0%,100% { opacity:1; }
    50%      { opacity:0.6; }
}

/* ── Bet button ── */
.ntj-bet-btn {
    background: #e8c44a;
    color: #111e40;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.13s, transform 0.1s;
}
.ntj-bet-btn:hover  { background: #f0d060; transform: translateY(-1px); }
.ntj-bet-btn:active { transform: translateY(0); }

/* ═══════════════════════════════════════
   FAVOURITES CARD — Tab system
═══════════════════════════════════════ */
.ntj-tab-bar {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}
.ntj-tab-btn {
    flex: 1;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #8a9bbf;
    transition: background 0.15s, color 0.15s;
}
.ntj-tab-btn.ntj-tab-active {
    background: #111e40;
    color: #fff;
}
.ntj-tab-btn:not(.ntj-tab-active):hover {
    background: #f2f4f8;
    color: #111e40;
}

/* ── Top Backed rows ── */
#ntj-fav-body {
    padding: 8px 0;
}
.ntj-backed-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f2f4f8;
}
.ntj-backed-row:last-of-type { border-bottom: none; }

.ntj-backed-rank {
    width: 26px; height: 26px;
    background: #f5f0dc;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
    color: #b8892a;
    flex-shrink: 0;
}
.ntj-backed-info { flex: 1; min-width: 0; }
.ntj-backed-name {
    font-size: 14px; font-weight: 700;
    color: #111e40;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ntj-backed-sub {
    font-size: 11px; color: #8a9bbf; margin-top: 2px;
}
.ntj-backed-right {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.ntj-backed-odds {
    font-size: 14px; font-weight: 800; color: #111e40;
}
.ntj-backed-pct {
    font-size: 11px; font-weight: 700; color: #27ae60;
}

/* ── Hot Tracks rows ── */
.ntj-hot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f2f4f8;
}
.ntj-hot-row:last-of-type { border-bottom: none; }

.ntj-hot-info { flex: 1; min-width: 0; }
.ntj-hot-name {
    font-size: 14px; font-weight: 700;
    color: #111e40;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ntj-hot-sub {
    font-size: 11px; color: #8a9bbf; margin-top: 2px;
}
.ntj-hot-handle {
    display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
}
.ntj-hot-amount {
    font-size: 14px; font-weight: 800; color: #111e40;
}
.ntj-hot-label {
    font-size: 11px; color: #8a9bbf;
}

/* ── Leaderboard button ── */
.ntj-leaderboard-btn {
    display: block;
    width: calc(100% - 36px);
    margin: 12px 18px 14px;
    padding: 11px;
    background: transparent;
    border: 1px solid #e0e4ef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #111e40;
    cursor: pointer;
    text-align: center;
    transition: background 0.13s;
}
.ntj-leaderboard-btn:hover { background: #f2f4f8; }

/* ── Loading / Empty / Error shared ── */
.ntj-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 24px 18px;
    color: #8a9bbf; font-size: 12px;
}
.ntj-spinner {
    width: 16px; height: 16px;
    border: 2px solid #e0e4ef;
    border-top-color: #e8c44a;
    border-radius: 50%;
    animation: ntj-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes ntj-spin { to { transform:rotate(360deg); } }
.ntj-empty { text-align:center; padding:24px 16px; color:#8a9bbf; font-size:12px; }
.ntj-err   { color:#e74c3c; font-size:11px; padding:10px 18px; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .ntj-row        { flex-direction: column; }
    .ntj-card--list,
    .ntj-card--fav  { flex: 1 1 100%; }
    .ntj-hero-title { font-size: 22px; }
    .ntj-list-scroll { max-height: 340px; }
}


/* Custom simplified layout */
.ntj-section{
    background:#081B33 !important;
    padding:20px !important;
}
.ntj-row{
    max-width:1100px;
    margin:0 auto;
    flex-wrap:nowrap;
}
.ntj-card--list{
    flex:0 0 58% !important;
}
.ntj-card--fav{
    flex:0 0 40% !important;
}
