/* Walkathon Leaderboard Styles */

table, td, th {
    border: none !important;
}

.walkathon-leaderboard-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    font-family: 'poppins', sans-serif;
    position: relative;
}

.walkathon-leaderboard-wrapper {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    --bs-table-color-type: var(--bs-table-striped-color);
    --bs-table-bg-type: #fff !important;
}

/* Tabs */
.leaderboard-tabs {
    display: flex;
    gap: 0;
    /* border-bottom: 1px solid #e0e0e0; */
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    padding-bottom: 0;
}

.leaderboard-tab {
    padding: 12px 24px;
    background: transparent;
    font-family: 'league spartan', sans-serif;
    border: none;
    cursor: pointer;
    font-size: 24px;
    width: 385px;
    font-weight: 700;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
    margin-bottom: -1px;
}

.leaderboard-tab:hover:not(.active) {
    color: #333;
    background: transparent;
}

.leaderboard-tab.active {
    color: #333;
    background: #9ACA3C;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.leaderboard-tab.active::after {
    content: '';
    position: absolute;
    /* bottom: -1px; */
    left: 50%;
    bottom:-23%;
    transform: translateX(-50%);
    width: calc(100% + 8px);
    min-width: calc(100% + 8px);
    height: 3px;
    background: #FFB347;
    z-index: 2;
}

/* Controls */
.leaderboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.leaderboard-entries-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.entries-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.entries-display {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    background: #fff;
    width: 60px;
    text-align: center;
    color: #333;
    font-weight: 500;
    cursor: pointer;
}

.entries-display:focus {
    outline: none;
    border-color: #ddd;
}

.entries-dropdown-btn {
    width: 36px;
    height: 35px;
    background: #FFB347;
    border: 1px solid #FFB347;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s;
}

.entries-dropdown-btn:hover {
    background: #FFB347;
    border-color: #FFB347;
}

.entries-dropdown-btn svg {
    width: 12px;
    height: 12px;
}

.entries-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-left: 5px;
}

.entries-select {
    position: absolute;
    left: 0;
    top: 0;
    width: 100px;
    height: 36px;
    opacity: 0;
    cursor: pointer;
    z-index: 1000;
    border: none;
    background: transparent;
}

.leaderboard-search {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    width: 250px;
    transition: border-color 0.3s;
    background: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #ddd;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    width: 36px;
    height: 35px;
    background: #FFB347;
    border: 1px solid #FFB347;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background: #e04402;
    border-color: #e04402;
}

.search-btn svg {
    width: 16px;
    height: 16px;
}

/* Table Container */
.leaderboard-table-container {
    position: relative;
    z-index: 1;
}

.leaderboard-tab-content {
    display: none;
}

.leaderboard-tab-content.active {
    display: block;
}

/* Table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


.leaderboard-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 18px;
    font-family: 'league spartan', sans-serif;
    color: #333;
    /* border-bottom: 2px solid #e0e0e0; */
}

.leaderboard-table td {
    padding: 15px;
    /* border-bottom: 1px solid #f0f0f0; */
    font-size: 14px;
    color: #333;
}

.leaderboard-table tbody tr {
    transition: background-color 0.2s, transform 0.1s ease, box-shadow 0.2s ease;
}

.leaderboard-table tbody tr[onclick] {
    cursor: pointer;
}

.leaderboard-table tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

.leaderboard-table tbody tr:nth-child(even) {
    background-color: #9ACA3C !important;
}

.leaderboard-table tbody tr:nth-child(odd):hover {
    background-color: #f9f9f9 !important;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaderboard-table tbody tr:nth-child(even):hover {
    background-color: #8bb835 !important;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaderboard-table tbody tr[onclick]:active {
    transform: translateX(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Participant Name Cell */
.participant-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-icon,
.participant-avatar,
.team-icon,
.participant-name-cell img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: inline-block;
    flex-shrink: 0;
    object-fit: cover;
    vertical-align: middle;
}

.participant-icon {
    background: #e0e0e0;
}

.participant-avatar,
.participant-name-cell img {
    border: 1px solid #e0e0e0;
}

.team-icon {
    background: linear-gradient(135deg, #fc4c02, #ff6b35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    line-height: 32px;
    text-align: center;
}

.participant-name {
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #10814B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    flex-shrink: 1;
    min-width: 0;
}

.participant-name1 {
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #10814B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.participants-data {
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #000;
}

/* Loading state for AJAX pagination */
.leaderboard-tab-content.leaderboard-loading .table-responsive {
    opacity: 0.6;
    pointer-events: none;
}

/* Pagination */
.leaderboard-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 10px;
}

.pagination-info {
    font-size: 13px;
    color: #000;
    font-family: 'Poppins', sans-serif;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Navigation buttons (arrows) */
.pagination-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #FFB347;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pagination-nav-btn:hover:not(:disabled) {
    background: #FFA500;
}

.pagination-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #FFB347;
}

.pagination-nav-btn svg {
    display: block;
}

.pagination-nav-btn.first-page svg,
.pagination-nav-btn.last-page svg {
    width: 14px;
    height: 14px;
}

.pagination-nav-btn.prev-page svg,
.pagination-nav-btn.next-page svg {
    width: 12px;
    height: 12px;
}

/* Page numbers as plain text */
.pagination-page-number {
    font-size: 14px;
    color: #666;
    font-family: sans-serif;
    cursor: pointer;
    padding: 0 4px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
    transition: color 0.2s;
}

.pagination-page-number:hover {
    color: #333;
}

.pagination-page-number.current {
    color: #666;
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    .walkathon-leaderboard-container {
        padding: 10px;
    }
    
    .leaderboard-tabs {
        flex-wrap: wrap;
    }
    
    .leaderboard-tab {
        padding: 12px 20px;
        font-size: 24px;
    }
    
    .leaderboard-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
    
    .leaderboard-table {
        font-size: 12px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
    }
    
    .leaderboard-pagination {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-info {
        text-align: center;
    }
}

/* Hide scrollbar for better appearance */
.leaderboard-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.leaderboard-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.leaderboard-table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.leaderboard-table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Leaderboard Profiles Styles */
.walkathon-leaderboard-profiles-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    font-family: 'Poppins', sans-serif;
}

.profiles-title {
    font-size: 48px;
    font-weight: 700;
    color: #10814B;
    margin-bottom: 30px;
    text-align: center;
    font-family: 'league spartan', sans-serif;
}

.profiles-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    /* border-bottom: 2px solid #e0e0e0; */
    justify-content: center;
}

.profiles-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #000;
    font-weight: 700;
    font-family: 'league spartan';
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.profiles-tab:hover {
    color: #000;
}

.profiles-tab.active {
    color: #000;
    font-weight: 700;
}

.profiles-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #9ACA3C;
}

.profiles-tab-content {
    display: none;
}

.profiles-tab-content.active {
    display: block;
}

.profiles-cards {
    margin-top: 30px;
}

.profiles-cards.row {
    margin-left: -15px;
    margin-right: -15px;
}

.profiles-cards .col-md-4,
.profiles-cards .col-sm-6,
.profiles-cards .col-12 {
    padding-left: 15px;
    padding-right: 15px;
}

.profile-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
   
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.profile-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
    border-radius: 16px;
}

.profile-card-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.profile-card-image.placeholder {
    background: linear-gradient(135deg, #9ACA3C, #10814B);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 64px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
}

.profile-card-content {
    padding: 5px;
}

.overall-progress-section {
    margin-bottom: 15px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    font-family: 'Poppins', sans-serif;
}

.progress-label {
    color: #000;
}

.progress-goal {
    color: #000;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: #fff;
    border: #FFB347 3px solid;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background: #FFB347;
    border-radius: 4px;
    transition: width 0.3s ease;
    background-color: #FFB347 !important; 
}

.progress-percentage {
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #FFB347;
    font-family: 'Poppins', sans-serif;
}

.distance-walked {
    color: #10814B;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
}

.profile-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 15px 0;
}

.participant-details {
    margin-bottom: 20px;
    text-align: center;
}

.participant-name, .participant-name1 {
    font-size: 24px;
    font-weight: 700;
    color: #10814B;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
   
}

.participant-type {
    font-size: 16px;
    color: #000;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
   
}

.funds-raised-label {
    font-size: 16px;
    color: #000;
    margin-bottom: 0px;
    font-family: 'Poppins', sans-serif;
  
}

.funds-raised-amount {
    font-size: 32px;
    font-weight: 700;
    color: #10814B;
    margin-bottom: 0px;
    font-family: 'Poppins', sans-serif;
   
}

.individual-progress {
    font-size: 16px;
    color: #000;
    font-family: 'Poppins', sans-serif;
}

.support-button {
    display: block;
    width: 100%;
   
    background: #9ACA3C;
   
    text-align: center;
    text-decoration: none;
   font-weight: 600;
  
    font-family: 'Poppins', sans-serif;
    box-shadow: none;
   
    border-radius: 40px;
    padding: 16px 24px;
    color: #000;
    font-size: 21px;
}

.support-button:hover {
    background: #9ACA3C;
    color: #000;
    text-decoration: none;
}

.walkathon-profiles-message {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.view-all-wrapper {
    text-align: center;
    margin-top: 30px;
}

.view-all-wrapper .support-button {
    width: 170px;
    display: inline-block;
    margin: 0 auto;
}

/* Horizontal scrollable cards for mobile */
.profiles-cards-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px 0;
    margin-top: 30px;
    scrollbar-width: thin;
    scrollbar-color: #9ACA3C #f0f0f0;
}

.profiles-cards-scroll::-webkit-scrollbar {
    height: 6px;
}

.profiles-cards-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.profiles-cards-scroll::-webkit-scrollbar-thumb {
    background: #9ACA3C;
    border-radius: 10px;
}

.profiles-cards-scroll::-webkit-scrollbar-thumb:hover {
    background: #8bb835;
}

.profile-card-wrapper {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
}

.profile-card-wrapper .profile-card {
    width: 100%;
    margin-bottom: 0;
}

/* Responsive Design for Profiles */
@media (max-width: 768px) {
    .participant-name, .participant-name1 {
        font-size: 16px;
       
    }

    .support-button{
font-size: 16px;
    }
    
   

    .profiles-title {
        font-size: 24px;
    }
    
     .walkathon-leaderboard-profiles-container .profiles-title{
        font-size: 38px;
    }
    
    .profiles-tabs {
        flex-wrap: wrap;
    }
    
    .profiles-tab {
        font-size: 16px;
        padding: 10px 16px;
    }
    
    .profiles-cards .col-md-4,
    .profiles-cards .col-sm-6 {
        margin-bottom: 20px;
    }
    
    .profile-card-image {
        height: 180px;
    }
}

/* iPad Mini (768px - 834px) */
@media (min-width: 768px) and (max-width: 834px) {
    .profiles-tabs {
        gap: 8px;
    }

    .leaderboard-tabs{
        flex-wrap: nowrap;
    }
    
    .profiles-tab {
        font-size: 20px;
        padding: 10px 18px;
    }
}

