/* ==========================================================================
   STRAVA LEADERBOARD CSS (GLASSMORPHISM & PREMIUM CUSTOM STYLING)
   ========================================================================== */

/* Fullscreen Fixed Static Background */
body.strava-page {
    color: #ffffff;
    min-height: 100vh;
    padding-top: 1px !important;
    /* Breaks margin-collapse with first child's mt-5 */
    background-color: #0f0f19 !important;
}

@keyframes straFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.strava-page .container {
    position: relative;
    z-index: 2;
}

.filter-text-link {
    cursor: pointer;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.25s ease-in-out;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.filter-text-link:hover,
.filter-text-link:focus {
    color: #fff !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 15px var(--bs-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.filter-text-link.active-sort {
    color: #fff !important;
    font-weight: 700 !important;
}

.filter-text-link::after {
    display: none !important;
    /* Hide bootstrap caret arrow */
}

.filter-dot {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.88rem;
    user-select: none;
}

.dropdown-menu-dark {
    background-color: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.dropdown-menu-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

.dropdown-menu-dark .dropdown-item.active,
.dropdown-menu-dark .dropdown-item:hover {
    background-color: var(--bs-primary);
    color: #fff;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(10, 10, 20, 0.65);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(252, 76, 2, 0.25);
    box-shadow: 0 20px 60px 0 rgba(252, 76, 2, 0.12), 0 16px 48px 0 rgba(0, 0, 0, 0.45);
}

/* Glass Modal */
.glass-modal .modal-content {
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #ffffff;
}

.glass-modal .modal-header,
.glass-modal .modal-footer {
    border-color: rgba(255, 255, 255, 0.08);
}

.glass-modal .form-select {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.glass-modal .form-select option {
    background-color: #1a1a24;
    color: #ffffff;
}

.glass-modal .form-select:focus {
    border-color: #FC4C02;
    box-shadow: 0 0 0 0.25rem rgba(252, 76, 2, 0.25);
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}


/* Navbar scroll transition override */
body.strava-page .navbar {
    transition: transform 0.3s ease-in-out, background-color 0.4s ease-in-out, box-shadow 0.4s ease-in-out !important;
}

/* Orange Glow Buttons */
.btn-strava {
    background: rgba(15, 15, 25, 0.4) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-strava i {
    color: #FC4C02;
    transition: transform 0.3s ease, color 0.3s ease;
}

.btn-strava:hover {
    background: rgba(252, 76, 2, 0.12) !important;
    color: #ffffff !important;
    border-color: #FC4C02 !important;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(252, 76, 2, 0.55), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-strava:hover i {
    transform: scale(1.15);
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Custom Table Design inside Glass Cards */
.glass-table,
.glass-table tr,
.glass-table th,
.glass-table td {
    background-color: transparent !important;
    background: transparent !important;
    color: #ffffff !important;
    --bs-table-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

.glass-table th {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.glass-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}

.glass-table tbody tr:hover {
    background-color: rgba(252, 76, 2, 0.08) !important;
}

/* ==========================================================================
   PER-ATHLETE SPORT BREAKDOWN SUB-ROW ("Tüm Branşlar" mode)
   ========================================================================== */

/* Remove bottom border from the parent row so it fuses with the breakdown row */
.glass-table tbody tr:has(+ .sport-breakdown-row) td {
    border-bottom: none !important;
}

/* Breakdown row base styling */
.sport-breakdown-row td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    padding-top: 0 !important;
    padding-bottom: 0.45rem !important;
}

/* Paired hover: parent row ↔ breakdown row highlight together */
.glass-table tbody tr:has(+ .sport-breakdown-row):hover,
.glass-table tbody tr:has(+ .sport-breakdown-row):hover+.sport-breakdown-row {
    background-color: rgba(252, 76, 2, 0.08) !important;
}

/* Reverse: hovering breakdown row highlights itself + its parent */
.glass-table tbody .sport-breakdown-row:hover,
.glass-table tbody tr:has(+ .sport-breakdown-row:hover) {
    background-color: rgba(252, 76, 2, 0.08) !important;
}

/* Breakdown content container */
.sport-breakdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding-left: 0;
    font-size: 0.72rem;
    opacity: 0.8;
    font-weight: 400;
}

.sport-breakdown>span,
.sport-breakdown>a {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
    text-decoration: none !important;
}

/* Dynamic justify-content based on sport count */
.sport-breakdown.breakdown-count-1 {
    justify-content: center;
}

.sport-breakdown.breakdown-count-2 {
    justify-content: center;
}

.sport-breakdown.breakdown-count-3 {
    justify-content: center;
}

/* Clickable sport filter links (breakdown rows + club total card) */
.sport-filter-link {
    text-decoration: none;
    color: inherit;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.sport-filter-link:hover {
    color: inherit;
    filter: brightness(1.35);
    opacity: 1;
}


/* Navbar background force transparency on Strava page */
body.strava-page .navbar {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Avatar Styles */
.strava-avatar {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.strava-avatar-sm {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Trophy Colors */
.trophy-gold {
    color: #ffc107;
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.5);
}

.trophy-silver {
    color: #dee2e6;
    text-shadow: 0 0 8px rgba(222, 226, 230, 0.5);
}

.trophy-bronze {
    color: #cd7f32;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.5);
}


/* Sync Overlay blur styles */
.sync-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.sync-overlay-content {
    background: rgba(25, 25, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 400px;
    text-align: center;
    color: #ffffff;
}


/* Glassmorphism Pagination */
.strava-pagination .page-link {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
}

.strava-pagination .page-link:hover {
    background-color: rgba(252, 76, 2, 0.2) !important;
    border-color: #FC4C02 !important;
    color: #FC4C02 !important;
}

.strava-pagination .page-item.active .page-link {
    background-color: #FC4C02 !important;
    border-color: #FC4C02 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(252, 76, 2, 0.5);
}

.strava-pagination .page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    pointer-events: none;
}

/* Strava Page Dark Mode Badge Overrides */
body.strava-page .badge-yuzme {
    background-color: rgba(0, 180, 216, 0.25) !important;
    color: #00b4d8 !important;
}

body.strava-page .badge-bisiklet {
    background-color: rgba(253, 126, 20, 0.25) !important;
    color: #fd7e14 !important;
}

body.strava-page .badge-kosu {
    background-color: rgba(25, 135, 84, 0.25) !important;
    color: #20c997 !important;
}

/* Scrollable table container */
@media (min-width: 992px) {
    .scrollable-table-container {
        flex: 1 1 0;
        min-height: 0;
        height: 0;
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .scrollable-table-container {
        max-height: 450px;
        overflow-y: auto;
    }
}

/* Custom Elegant Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(252, 76, 2, 0.5) !important;
}

/* Floating Glass Success Toast Card */
.toast-success-card {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 1050;
    background: rgba(20, 30, 20, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(40, 167, 69, 0.15);
    color: #ffffff;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.toast-success-card.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

/* Totals card metric label */
.totals-metric-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

/* Letter-spacing utility */
.letter-spacing-2 {
    letter-spacing: 0.08em;
}

/* ==========================================================================
   CHAMPIONS CARD — Person-first, 2 rows, generous spacing
   ========================================================================== */
.champions-card,
.highlights-card {
    line-height: 1.3;
}

.champions-card-title,
.highlights-card-title {
    font-size: 0.62rem !important;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
}

/* Each champion slot — person is the entire focus */
.champions-card .champion-slot {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.champions-card .champion-slot+.champion-slot {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Large avatar with colored glow ring */
.champions-card .champion-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: box-shadow 0.3s ease;
}

.champions-card .champion-avatar.avatar-time {
    border-color: rgba(255, 193, 7, 0.7);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.35);
}

.champions-card .champion-avatar.avatar-distance {
    border-color: rgba(219, 9, 46, 0.7);
    box-shadow: 0 0 10px rgba(219, 9, 46, 0.35);
}

.champions-card .champion-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0.15rem;
}

/* Category label — tiny muted badge above the name */
.champions-card .champion-category {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.6;
}

/* Name is the hero */
.champions-card .champion-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stat is clearly secondary */
.champions-card .champion-stat {
    font-size: 1.15rem;
    opacity: 0.95;
    font-weight: 700;
}

/* ==========================================================================
   CHAMPION TOOLTIP BUBBLE — Per-branch breakdown on hover/tap
   ========================================================================== */

/* Parent slot needs position context for the bubble */
.champions-card .champion-slot {
    position: relative;
}

/* The bubble itself */
.champion-tooltip-bubble {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    z-index: 100;
    background: rgba(12, 12, 22, 0.92);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 12px rgba(252, 76, 2, 0.08);
}

/* Arrow pointing left toward the champion slot */
.champion-tooltip-bubble::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(255, 255, 255, 0.1);
}

.champion-tooltip-bubble::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(12, 12, 22, 0.92);
    margin-right: 1px;
}

/* Visible state */
.champion-tooltip-bubble.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

/* Each sport row inside the bubble */
.champion-bubble-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0;
    font-size: 0.78rem;
}

.champion-bubble-row + .champion-bubble-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Uniform icon column width — matches the widest icon (yüzme 2.4em) */
.champion-bubble-row .sport-icon {
    min-width: 2.4em;
}

.champion-bubble-label {
    font-weight: 600;
    font-size: 0.72rem;
    min-width: 50px;
}

.champion-bubble-value {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    font-size: 0.78rem;
}

.champion-bubble-divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.6rem;
}

/* Mobile: position below the slot; override ancestor overflow clipping */
@media (max-width: 991.98px) {
    .champion-tooltip-bubble {
        left: 50%;
        top: calc(100% + 10px);
        transform: translateX(-50%) translateY(6px);
    }

    .champion-tooltip-bubble.visible {
        transform: translateX(-50%) translateY(0);
    }

    /* Arrow points up toward the champion slot */
    .champion-tooltip-bubble::before {
        right: auto;
        left: 50%;
        top: auto;
        bottom: 100%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-bottom-color: rgba(255, 255, 255, 0.1);
        border-right-color: transparent;
    }

    .champion-tooltip-bubble::after {
        right: auto;
        left: 50%;
        top: auto;
        bottom: 100%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-bottom-color: rgba(12, 12, 22, 0.92);
        border-right-color: transparent;
        margin-right: 0;
        margin-bottom: 1px;
    }

    /* Allow the bubble to escape carousel/card overflow clipping */
    .carousel-item,
    .carousel-inner,
    .champions-card,
    .carousel-item .champions-card {
        overflow: visible !important;
    }
}


/* ==========================================================================
   HIGHLIGHTS CARD — Activity-first, 3 compact rows
   ========================================================================== */


.highlights-card .highlight-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    flex: 1;
}

.highlights-card .highlight-section+.highlight-section {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Smaller avatar — person supports, doesn't headline */
.highlights-card .highlight-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.highlights-card .highlight-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0.1rem;
    min-width: 0;
}

/* Activity name is the hero */
.highlights-card .highlight-activity {
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Person name — subdued, clearly secondary */
.highlights-card .highlight-person {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45) !important;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stat distance */
.highlights-card .highlight-stat {
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0.95;
}

/* Badge icon on avatar */
.champion-badge-icon {
    font-size: 0.62rem !important;
    padding: 3px !important;
    line-height: 1 !important;
}

/* Leaflet Map & Activity Detail Modal Styles */
#activity-map-container {
    background-color: #0f0f19;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

#activity-map {
    z-index: 1;
}

/* Customizing Leaflet Controls for Dark Theme */
.leaflet-bar {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    background-color: rgba(20, 20, 30, 0.8) !important;
    backdrop-filter: blur(8px);
}

.leaflet-bar a {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.2s ease;
}

.leaflet-bar a:hover {
    background-color: rgba(252, 76, 2, 0.2) !important;
    color: #ffffff !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    font-size: 16px !important;
}

/* Glassmorphic border utility for stats detail modal */
.border-white-05 {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Activity detail trigger animations */
.activity-detail-trigger {
    cursor: pointer;
    transition: color 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
}

.activity-detail-trigger:hover {
    color: #FC4C02 !important;
    text-shadow: 0 0 8px rgba(252, 76, 2, 0.4);
}

/* Modal animation overrides */
.glass-modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}

.glass-modal.show .modal-dialog {
    transform: scale(1);
}

/* Custom border opacity helper */
.border-white-10 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Responsive border overrides for merged cards */
@media (min-width: 992px) {
    .border-lg-bottom-0 {
        border-bottom: 0 !important;
    }

    .border-lg-end {
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
}

/* Custom sport theme colors */
.text-strava-yuzme {
    color: #00b4d8 !important;
}

.text-strava-bisiklet {
    color: #fd7e14 !important;
}

.text-strava-kosu {
    color: #20c997 !important;
}

/* Leaflet Dark Theme styling overrides */
.leaflet-bar,
.leaflet-control-layers {
    background-color: rgba(20, 20, 30, 0.85) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
}

.leaflet-control-layers-expanded {
    padding: 10px 14px !important;
    font-family: inherit !important;
    font-size: 13px !important;
}

.leaflet-control-layers label {
    margin-bottom: 4px;
    cursor: pointer;
}

.leaflet-control-layers label:last-child {
    margin-bottom: 0;
}

.leaflet-bar a {
    background-color: transparent !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: background-color 0.2s;
}

.leaflet-bar a:last-child {
    border-bottom: none !important;
}

.leaflet-bar a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.leaflet-control-layers-list input[type="radio"] {
    accent-color: #db092e;
    /* Club red */
    margin-right: 6px;
    vertical-align: middle;
}

/* CSS Dark Mode Filters for Map Tile Layers (preserving route line colors) */
.map-dark-filter-streets .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(85%) contrast(90%) saturate(80%) !important;
}

.map-dark-filter-satellite .leaflet-tile-pane {
    filter: brightness(55%) contrast(115%) saturate(75%) !important;
}

/* Responsive Mobile Layout Fixes */
@media (max-width: 576px) {

    /* Filter dropdown text sizing and padding */
    .filter-text-link {
        font-size: 0.75rem !important;
        padding: 1px 4px !important;
    }

    .filter-dot {
        font-size: 0.75rem !important;
        margin: 0 !important;
    }

    /* Table padding & font size adjustments to prevent side-scrolling */
    .glass-table th,
    .glass-table td {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.78rem !important;
    }

    .strava-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    .glass-table td .d-flex.align-items-center {
        gap: 0.25rem;
    }

    .glass-table td .d-flex.align-items-center img {
        margin-right: 0.25rem !important;
    }

    /* Carousel card alignments */
    .carousel-item .champions-card,
    .carousel-item .highlights-card {
        padding-bottom: 10px;
        min-height: 190px;
    }

    /* Highlights list spacing */
    .highlight-section {
        margin-bottom: 10px;
    }

    .highlight-section:last-child {
        margin-bottom: 0;
    }

    .sport-breakdown {
        font-size: 0.65rem;
        gap: 2rem;
        justify-content: center;
        padding-left: 0;
    }

    .sport-breakdown-row td {
        border-bottom: none !important;
    }
}

.athlete-name {
    max-width: 130px;
    display: inline-block;
    vertical-align: middle;
}

.rank-medal {
    width: 36px;
    height: 36px;
}

@media (max-width: 576px) {
    .rank-medal {
        width: 28px !important;
        height: 28px !important;
    }

    .athlete-name {
        max-width: 80px !important;
    }

    .glass-table th,
    .glass-table td {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }

    .sport-breakdown {
        font-size: 0.62rem;
        gap: 1.5rem;
        justify-content: center;
        padding-left: 0;
    }

    .sport-breakdown-row td {
        border-bottom: none !important;
    }
}

@media (max-width: 375px) {
    .rank-medal {
        width: 22px !important;
        height: 22px !important;
    }

    .athlete-name {
        max-width: 65px !important;
    }

    .glass-table th,
    .glass-table td {
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
        font-size: 0.72rem !important;
    }

    .strava-avatar {
        width: 24px !important;
        height: 24px !important;
    }

    .sport-breakdown {
        font-size: 0.58rem;
        gap: 1rem;
        justify-content: center;
        padding-left: 0;
    }

    .sport-breakdown-row td {
        border-bottom: none !important;
    }
}

/* Mobile-only Chevron Indicator for Clickable Activity Names */
.mobile-chevron {
    color: #FC4C02 !important;
    font-size: 0.625rem !important;
}

/* Custom Sport Icons utilizing SVG masks for consistent currentColor styling */
.sport-icon {
    display: inline-block;
    background-color: currentColor;
    vertical-align: middle;
    flex-shrink: 0;
}

.sport-icon-yuzme {
    -webkit-mask: url('../images/swim.svg') no-repeat center / contain;
    mask: url('../images/swim.svg') no-repeat center / contain;
    width: 2.4em;
    height: 1em;
    margin-right: 0em;
}

.sport-icon-bisiklet {
    -webkit-mask: url('../images/bike.svg') no-repeat center / contain;
    mask: url('../images/bike.svg') no-repeat center / contain;
    width: 1.1em;
    height: 1.1em;
}

.sport-icon-kosu {
    -webkit-mask: url('../images/run.svg') no-repeat center / contain;
    mask: url('../images/run.svg') no-repeat center / contain;
    width: 1.5em;
    height: 1.4em;
}

/* ==========================================================================
   STREAK FLAME BADGE — Weekly activity streak indicator
   ========================================================================== */

/* Streak badge wrapper — positions flame + number together */
.streak-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.4rem;
    margin-left: 0.4rem;
    vertical-align: middle;
    flex-shrink: 0;
    color: #FC5200;
}

/* Flame fills the entire badge wrapper */
.streak-flame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background-color: currentColor;
    opacity: 0.8;
    -webkit-mask: url('../images/flame.svg') no-repeat center / contain;
    mask: url('../images/flame.svg') no-repeat center / contain;
}

/* Number — centered in the lower body of the flame */
.streak-count {
    position: relative;
    z-index: 1;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #ffffff;
    line-height: 1;
    margin-top: 0.6rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
    /* push into the flame body, away from tip */
}

/* Pseudo-element hack to hide WebKit's internal overlapping stroke paths */
.streak-count::after {
    content: attr(data-count);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 1);
    color: transparent;
    text-shadow: none;
}

/* Tier: 10+ — Hot */
.streak-badge.streak-hot {
    color: #ff7f00;
    filter: drop-shadow(0 0 5px rgba(255, 127, 0, 0.45));
}

/* Tier: 25+ — Gold */
.streak-badge.streak-gold {
    color: #ffb300;
    filter: drop-shadow(0 0 6px rgba(255, 179, 0, 0.6));
}

/* Tier: 50+ — Legendary */
.streak-badge.streak-legendary {
    color: #ffe600;
    filter: drop-shadow(0 0 6px rgba(255, 230, 0, 0.7)) drop-shadow(0 0 14px rgba(255, 230, 0, 0.35));
}

@media (max-width: 576px) {
    .streak-badge {
        width: 1.6rem;
        height: 1.85rem;
        margin-left: 0.25rem;
    }

    .streak-count {
        font-size: 0.7rem;
        margin-top: 0.65rem;
    }
}

/* ==========================================================================
   ACTIVITY CARD FEED — Card-based activity stream
   ========================================================================== */

/* Card List Container */
.activity-card-list {
    overflow-y: auto;
    padding-top: 4px;
    /* Prevents top card border clipping on hover lift */
}

@media (min-width: 992px) {
    .activity-card-list {
        max-height: 680px;
    }
}

/* Individual Activity Card */
.activity-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Sport-themed hover border colors (subtle accent) */
.activity-card.sport-kosu:hover {
    border-color: rgba(32, 201, 151, 0.35);
}

.activity-card.sport-bisiklet:hover {
    border-color: rgba(253, 126, 20, 0.35);
}

.activity-card.sport-yuzme:hover {
    border-color: rgba(0, 180, 216, 0.35);
}

.activity-card.sport-diger:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Card Header: Avatar + Name + Date */
.activity-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.activity-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.activity-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-card-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Card Body: Activity Title + Badge */
.activity-card-body {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.activity-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.activity-card:hover .activity-card-title {
    color: #FC4C02 !important;
    text-shadow: 0 0 8px rgba(252, 76, 2, 0.4);
}

.activity-card-body .badge {
    flex-shrink: 0;
}

/* Card Minimap: Lightweight route polyline */
.activity-card-minimap {
    width: 100%;
    height: 80px;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    position: relative;
}

.polyline-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Card Stats: Mesafe | Süre | Tempo */
.activity-card-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 8px;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.activity-stat-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.activity-stat-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

/* Sport-themed stat value colors */
.activity-card.sport-kosu .activity-stat-value {
    color: #20c997;
}

.activity-card.sport-bisiklet .activity-stat-value {
    color: #fd7e14;
}

.activity-card.sport-yuzme .activity-stat-value {
    color: #00b4d8;
}

.activity-card.sport-diger .activity-stat-value {
    color: rgba(255, 255, 255, 0.7);
}

/* Vertical divider between stats */
.activity-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* ---- Activity Card Responsive ---- */
@media (max-width: 576px) {
    .activity-card {
        padding: 0.75rem 0.85rem;
    }

    .activity-card-avatar {
        width: 30px;
        height: 30px;
    }

    .activity-card-name {
        font-size: 0.78rem;
    }

    .activity-card-title {
        font-size: 0.88rem;
    }

    .activity-card-body {
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-bottom: 0.6rem;
    }

    .activity-stat-value {
        font-size: 0.82rem;
    }

    .activity-stat-label {
        font-size: 0.58rem;
    }

    .activity-stat-divider {
        height: 22px;
    }

    .activity-card-minimap {
        height: 60px;
    }
}

/* ==========================================================================
   PAGINATION JUMP COMPONENT
   ========================================================================== */
.page-jump-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.page-jump-input {
    padding: 0;
    width: 38px;
    cursor: text;
    outline: none;
}

@media (max-width: 575.98px) {
    .strava-pagination .page-link {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.75rem !important;
    }

    .page-jump-input {
        width: 30px !important;
    }
}