/**
 * Sky Leaderboard Styles
 */

/* Container */
.skyl-leaderboard-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
}

/* Fundraisers List */
.skyl-fundraisers-list {
    padding: 0;
}

/* Fundraiser Item */
.skyl-fundraiser-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: default;
}

a.skyl-fundraiser-item {
    cursor: pointer;
}

.skyl-fundraiser-item:hover {
    background-color: #f9f9f9;
}

/* Rank Wrapper */
.skyl-rank-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    margin-right: 15px;
}

/* Rank Badge */
.skyl-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 36px;
    text-align: center;
}

.skyl-rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.skyl-rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(192, 192, 192, 0.4);
}

.skyl-rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B8721A 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(205, 127, 50, 0.4);
}

.skyl-rank-default {
    background: #4CAF50;
    color: #ffffff;
}

/* Amount Badge */
.skyl-badge {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #4CAF50;
    white-space: nowrap;
}

/* Fundraiser Image */
.skyl-fundraiser-image {
    width: 60px;
    min-width: 60px;
    margin-right: 15px;
}

.skyl-fundraiser-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Fundraiser Info */
.skyl-fundraiser-info {
    flex: 1;
    min-width: 0;
}

/* Goal Circle */
.skyl-goal-circle {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-left: auto;
}

.skyl-circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.skyl-circle-bg {
    fill: none;
    stroke: #e6e6e6;
    stroke-width: 2.5;
}

.skyl-circle-progress {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 2.5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dasharray 0.6s ease;
}

.skyl-percentage-text {
    fill: #333333;
    font-size: 8px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
}

.skyl-fundraiser-title {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.skyl-fundraiser-item:hover .skyl-fundraiser-title {
    color: #4CAF50;
}

.skyl-fundraiser-amount {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #666666;
}

/* Load More */
.skyl-load-more-wrapper {
    padding: 10px 0;
    text-align: center;
}

.skyl-load-more {
    display: inline-block;
    width: 100%;
    padding: 12px 30px;
    background: #e8f5e9;
    color: #4CAF50;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skyl-load-more:hover {
    background: #4CAF50;
    color: #ffffff;
}

.skyl-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.skyl-loading {
    text-align: center;
    padding: 20px;
}

.skyl-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e8f5e9;
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: skyl-spin 0.8s linear infinite;
}

@keyframes skyl-spin {
    to {
        transform: rotate(360deg);
    }
}

/* New item animation */
.skyl-fundraiser-item.skyl-new-item {
    animation: skyl-fade-in 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes skyl-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Fundraisers Message */
.skyl-no-fundraisers {
    text-align: center;
    padding: 20px 10px;
    color: #666;
}

.skyl-no-fundraisers p {
    margin: 0 0 10px;
    font-size: 16px;
}

.skyl-no-fundraisers small {
    color: #999;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .skyl-fundraiser-item {
        padding: 12px 15px;
    }
    
    .skyl-rank-wrapper {
        min-width: 50px;
        margin-right: 10px;
    }
    
    .skyl-rank {
        width: 30px;
        height: 30px;
        font-size: 14px;
        line-height: 30px;
    }
    
    .skyl-badge {
        font-size: 10px;
    }
    
    .skyl-fundraiser-image {
        width: 50px;
        min-width: 50px;
        margin-right: 10px;
    }
    
    .skyl-fundraiser-image img {
        width: 50px;
        height: 50px;
    }
    
    .skyl-fundraiser-title {
        font-size: 14px;
    }
    
    .skyl-fundraiser-amount {
        font-size: 13px;
    }
    
    .skyl-goal-circle {
        width: 45px;
        height: 45px;
    }
    
    .skyl-percentage-text {
        font-size: 7px;
    }
}

@media (max-width: 480px) {
    .skyl-rank-wrapper {
        min-width: 40px;
    }
    
    .skyl-badge {
        font-size: 9px;
    }
    
    .skyl-fundraiser-image {
        width: 45px;
        min-width: 45px;
    }
    
    .skyl-fundraiser-image img {
        width: 45px;
        height: 45px;
    }
    
    .skyl-goal-circle {
        width: 40px;
        height: 40px;
    }
    
    .skyl-percentage-text {
        font-size: 6px;
    }
}
