/* Topvoters Modern CSS - Inspired by sidebox modules */

/* Reset and base styles */
.sidebox-topvoters .sidebox-head.text-ellipsis {
    display: none;
}

/* Card styling matching other modules */
.card.sidebox {
    background: none;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card.sidebox:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* Header enhancements */
.card-header {
    background: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    padding: 1rem !important;
}

.card-header span {
    font-weight: 600;
    font-size: 1rem;
    color: #fff !important;
}

/* Badge improvements */
.status-badge-small {
    border-radius: 16px !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    border: none !important;
}

.status-badge-small:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

.bg-vote {
    background: linear-gradient(135deg, #6f42c1, #e83e8c) !important;
    animation: pulse-vote 3s infinite;
}

@keyframes pulse-vote {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.85; 
        transform: scale(1.01);
    }
}

/* Card body improvements */
.card-body {
    padding: 1.25rem !important;
    background: none;
}

/* Voter rows styling */
.voters-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.voter-row {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(233, 236, 239, 0.4));
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.voter-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.voter-row:hover::before {
    left: 100%;
}

.voter-row:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.7));
    transform: translateX(4px) translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Podium special effects - couleurs accentuées */
.podium-rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 223, 0, 0.2)) !important;
    border-left-color: #ffd700 !important;
    border-left-width: 5px !important;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    animation: golden-glow 3s ease-in-out infinite;
}

.podium-rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.25), rgba(192, 192, 192, 0.15)) !important;
    border-left-color: #c0c0c0 !important;
    border-left-width: 5px !important;
    box-shadow: 0 4px 20px rgba(192, 192, 192, 0.35);
}

.podium-rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), rgba(205, 127, 50, 0.15)) !important;
    border-left-color: #cd7f32 !important;
    border-left-width: 5px !important;
    box-shadow: 0 4px 20px rgba(205, 127, 50, 0.35);
}

@keyframes golden-glow {
    0%, 100% { box-shadow: 0 4px 16px rgba(255, 215, 0, 0.25); }
    50% { box-shadow: 0 6px 24px rgba(255, 215, 0, 0.4); }
}

/* Rank styling */
.voter-rank {
    min-width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rank-medal {
    font-size: 1.5rem;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
    animation: medal-bounce 2s ease-in-out infinite;
}

@keyframes medal-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.rank-number {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Voter info */
.voter-info {
    flex: 1;
    margin-left: 1.25rem;
}

.voter-name {
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.voter-name:hover {
    color: #ffd700;
    text-decoration: none;
    transform: translateX(2px);
}

.voter-name::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #6f42c1, #e83e8c);
    transition: width 0.3s ease;
}

.voter-name:hover::after {
    width: 100%;
}

/* Vote count styling */
.voter-votes {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 90px;
}

.vote-count {
    font-weight: 700;
    color: #4ade80;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 0.125rem;
}

.vote-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    font-weight: 500;
}

/* No voters state */
.no-voters {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255,255,255,0.8);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.no-voters-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.no-voters-text {
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.no-voters-sub {
    font-size: 0.9rem;
    opacity: 0.85;
    font-style: italic;
}

/* Footer improvements */
.card-footer {
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.08), rgba(232, 62, 140, 0.08)) !important;
    border-top: 1px solid rgba(111, 66, 193, 0.15) !important;
    text-align: center;
    padding: 1rem !important;
    position: relative;
    overflow: hidden;
}

.card-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: footer-shine 4s ease-in-out infinite;
}

@keyframes footer-shine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.vote-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6f42c1;
    position: relative;
    z-index: 1;
}

.cta-text {
    display: inline-block;
    animation: glow 2.5s ease-in-out infinite alternate;
    cursor: default;
    transition: transform 0.3s ease;
}

.cta-text:hover {
    transform: scale(1.05);
}

@keyframes glow {
    from { 
        text-shadow: 0 0 8px rgba(111, 66, 193, 0.6); 
    }
    to { 
        text-shadow: 0 0 16px rgba(111, 66, 193, 0.9), 0 0 24px rgba(232, 62, 140, 0.7); 
    }
}

/* Responsive improvements */
@media (max-width: 576px) {
    .voter-row {
        padding: 0.75rem;
    }
    
    .voter-rank {
        min-width: 50px;
    }
    
    .rank-medal {
        font-size: 1.2rem;
    }
    
    .voter-info {
        margin-left: 1rem;
    }
    
    .voter-votes {
        min-width: 70px;
    }
    
    .vote-count {
        font-size: 0.9rem;
    }
}