/* Season Calendar Section */
.season-calendar-section {
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-header h2 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0;
}

.upcoming-count-badge {
    background: #e9f0ff;
    color: #2b7cff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin-left: 0.5rem;
}

.legend-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6c7a89;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-world-cup .legend-dot {
    background: #5b9eff;
}

.legend-superprestige .legend-dot {
    background: #10b981;
}

.legend-x20 .legend-dot {
    background: #f59e0b;
}

.legend-national .legend-dot {
    background: #a855f7;
}

.calendar-table-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e3eaf3;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.calendar-table thead {
    position: sticky;
    top: 0;
    background: #f8fbff;
    z-index: 10;
}

.calendar-table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6c7a89;
    border-bottom: 2px solid #e3eaf3;
}

.calendar-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.calendar-table tbody tr.past-race {
    opacity: 0.5;
}

.calendar-table tbody tr.past-race:hover {
    opacity: 0.7;
}

.calendar-table tbody tr:hover {
    background: #f8fbff;
}

.calendar-table tbody tr:last-child {
    border-bottom: none;
}

.calendar-table tbody td {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    vertical-align: middle;
}

.col-date {
    width: 15%;
    font-weight: 600;
    color: #1a1a1a;
}

.col-race {
    width: 35%;
    font-weight: 600;
    color: #1a1a1a;
}

.col-location {
    width: 30%;
    color: #6c7a89;
}

.location-icon {
    color: #9ca3af;
    margin-right: 0.25rem;
    vertical-align: text-bottom;
}

.col-series {
    width: 20%;
}

.series-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.series-world-cup {
    background: #dbeafe;
    color: #1e40af;
}

.series-superprestige {
    background: #d1fae5;
    color: #065f46;
}

.series-x20 {
    background: #fef3c7;
    color: #92400e;
}

.series-national {
    background: #f3e8ff;
    color: #6b21a8;
}

/* Upcoming races header */
.upcoming-header { 
    display:flex; 
    align-items:center; 
    justify-content:space-between; 
}
.view-all { 
    color:#2b7cff; 
    text-decoration:none; 
    font-weight:600; 
}

/* Section header */
.section-header h2 {
    font-weight: 700;
    font-size: 2rem;
}

/* Recent Results section */
a.result-card-link,
a.result-card-link:hover,
a.result-card-link:focus,
a.result-card-link:active,
a.result-card-link:visited {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.result-card-link *,
.result-card-link *:hover,
.result-card-link *:focus {
    text-decoration: none !important;
}

.result-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #b6d2ff;
    padding: 1rem;
    box-shadow: 0 1px 4px 0 rgba(44,62,80,0.06);
    transition: box-shadow 0.15s, transform 0.18s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.result-card-link:hover .result-card {
    box-shadow: 0 3px 10px 0 rgba(44,62,80,0.10);
    transform: scale(1.02);
}

.result-card-link:hover .result-title {
    color: #2b7cff;
}

.result-card-link:hover .view-details-btn {
    background: #2b7cff;
    border-color: #2b7cff;
    color: #fff;
}

.result-card-header {
    margin-bottom: 0.75rem;
}

.result-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: #2b7cff;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: inline-block;
}

.result-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0.4rem;
    margin-bottom: 0.2rem;
    color: #1a1a1a;
}

.result-date {
    font-size: 0.8rem;
    color: #6c7a89;
    margin-top: 0.3rem;
    margin-bottom: 0.9rem;
}

.result-podium {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    background: #f8fbff;
    transition: background 0.15s;
}

.result-item:hover {
    background: #eef5ff;
}

.result-position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
    color: #fff;
}

.result-position-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.result-position-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    box-shadow: 0 2px 6px rgba(192, 192, 192, 0.3);
}

.result-position-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B8733B 100%);
    box-shadow: 0 2px 6px rgba(205, 127, 50, 0.3);
}

.result-rider-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #9ca3af;
}

.result-rider-1 {
    font-weight: 700;
    color: #1a1a1a;
}

/* Race cards */
.race-card {
    border-radius: 10px;
    border: 1px solid #b6d2ff;
    box-shadow: 0 1px 4px 0 rgba(44,62,80,0.06);
    background: #fff;
    padding: 0;
    transition: box-shadow 0.15s, transform 0.18s;
}
.race-card:hover {
    box-shadow: 0 3px 10px 0 rgba(44,62,80,0.10);
    transform: scale(1.02);
}
.card-body {
    padding: 1rem 1rem 0.75rem 1rem;
}
.race-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    background: #2b7cff;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px 0 rgba(44,62,80,0.04);
}
.race-header-icon {
    color: #2b7cff;
    background: #f3f8ff;
    border-radius: 50%;
    padding: 0.3em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0.35rem;
    margin-bottom: 0.1rem;
    transition: color 0.15s;
}
.race-card:hover .card-title {
    color: #2b7cff;
}

/* Race metadata */
.race-meta {
    font-size: 0.85rem;
    color: #6c7a89;
    margin-bottom: 0.75rem;
    margin-top: 0.4rem;
    line-height: 1.3;
}
.race-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.1rem;
}
.race-meta-row:last-child {
    margin-bottom: 0;
}

/* Terrain section */
.terrain-section {
    border: none;
    border-radius: 0;
    background: none;
    padding: 0;
    margin-bottom: 0.7rem;
    box-shadow: none;
}
.terrain-section-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.terrain-section-title svg {
    color: #000;
    width: 1.1em;
    height: 1.1em;
}
.terrain-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1.8rem;
    margin: 0 0 0.15rem 0;
    padding: 0;
}
.terrain-item {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    min-width: 0;
    background: none;
    padding: 0.05rem 0.15rem;
}
.terrain-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: none;
    font-size: 0.95em;
    margin-right: 0.1em;
    grid-column: 1;
}
.terrain-label {
    color: #222;
    font-weight: 500;
    margin-right: 0.3em;
    grid-column: 2;
    font-size: 0.85rem;
}
.terrain-pct {
    font-weight: 700;
    color: #222;
    font-size: 0.85rem;
    margin-left: 0.3em;
    justify-self: end;
    grid-column: 3;
}
.terrain-desc {
    font-size: 0.8rem;
    color: #6c7a89;
    font-style: italic;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
}

/* Card footer */
.card-footer-btn {
    text-align: center;
    padding: 0.75rem 1rem 0.9rem 1rem;
    background: #fff;
    border-top: none;
}
.view-details-btn {
    border-radius: 6px;
    border: 1px solid #e3eaf3;
    padding: 0.55rem 0.75rem;
    background: #fafdff;
    color: #000;
    font-weight: 700;
    display: block;
    width: 100%;
    font-size: 0.9rem;
    transition: background 0.12s, border 0.12s, color 0.15s;
    text-decoration: none;
}
.view-details-btn:hover {
    background: #2b7cff;
    border-color: #2b7cff;
    color: #fff;
    text-decoration: none;
}

/* Starter chips */
.starter-chip { 
    display:flex; 
    align-items:center; 
    gap:0.6rem; 
    padding:0.45rem 0.5rem; 
    border-radius:6px; 
    background:#fbfdff; 
    transition: background 0.15s; 
    cursor: pointer; 
}
.starter-chip:hover { 
    background:#eef5ff; 
}
.starter-avatar { 
    width:32px; 
    height:32px; 
    border-radius:50%; 
    background:#e9f0ff; 
    color:#2b7cff; 
    display:inline-flex; 
    align-items:center; 
    justify-content:center; 
    font-weight:700; 
    font-size:0.8rem; 
}
.starter-meta { 
    font-size:0.8rem; 
    line-height:1.3; 
}
.starter-sub { 
    font-size:0.7rem; 
    color:#8a94a6; 
}
.starter-performance { 
    font-size:0.68rem; 
    color:#6c7a89; 
    margin-top: 0.1rem; 
}

/* Category badges in calendar table */
.category-link {
    text-decoration: none !important;
    display: inline-block;
}

.category-link:hover {
    text-decoration: none !important;
}

.category-link .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    transition: all 0.2s;
    display: inline-block;
}

.category-link:hover .badge {
    opacity: 0.85;
    transform: scale(1.05);
}

.category-link .bg-primary {
    background-color: #0d6efd !important;
    color: #fff !important;
}

.category-link .bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

.category-link .bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Make calendar rows clickable */
.calendar-table tbody tr {
    cursor: pointer;
}

.calendar-table tbody tr.clickable-row:hover {
    background: #f8fbff;
    box-shadow: inset 0 0 0 2px #e3eaf3;
}
