/* Song Voter Widget Styles */

.svw-player-container {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.svw-player-main {
    background: linear-gradient(145deg, #e6e9ed, #f5f7fa);
    border-radius: 16px;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.1),
        -8px -8px 16px rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.svw-player-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

/* Song Title */
.svw-song-title {
    padding: 16px 20px 12px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(53, 122, 189, 0.05));
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.svw-title-text {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Player Controls Row */
.svw-player-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

/* Play Button */
.svw-play-button {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #d1d5db, #e5e7eb);
    box-shadow: 
        5px 5px 10px rgba(0, 0, 0, 0.15),
        -5px -5px 10px rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #374151;
}

.svw-play-button:hover {
    background: linear-gradient(145deg, #4a90e2, #357abd);
    color: white;
    box-shadow: 
        5px 5px 15px rgba(74, 144, 226, 0.4),
        -5px -5px 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.svw-play-button:active {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.2),
        inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    transform: scale(0.98);
}

.svw-play-button.playing .svw-play-icon {
    display: none;
}

.svw-play-button.playing .svw-pause-icon {
    display: block !important;
}

/* Player Controls */
.svw-player-controls {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svw-progress-container {
    height: 6px;
    background: linear-gradient(145deg, #d1d5db, #e5e7eb);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.1),
        inset -1px -1px 2px rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.svw-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #357abd);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.5);
}

.svw-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
}

.svw-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

/* Voting Controls */
.svw-voting-controls {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.svw-vote-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: linear-gradient(145deg, #e6e9ed, #f5f7fa);
    border-radius: 12px;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.1),
        -4px -4px 8px rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    position: relative;
}

.svw-vote-button:hover {
    color: #374151;
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.15),
        -6px -6px 12px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.svw-vote-button:active {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.15),
        inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    transform: translateY(0);
}

.svw-vote-button.voted {
    color: #4a90e2;
    background: linear-gradient(145deg, #dbeafe, #eff6ff);
    box-shadow: 
        4px 4px 8px rgba(74, 144, 226, 0.2),
        -4px -4px 8px rgba(255, 255, 255, 0.9);
}

.svw-vote-button.voting {
    pointer-events: none;
    opacity: 0.7;
}

.svw-vote-button svg {
    flex-shrink: 0;
}

.svw-vote-count {
    min-width: 20px;
    text-align: center;
}

/* Feedback animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.svw-vote-button.vote-success {
    animation: pulse 0.4s ease;
}

/* Audio element hidden */
.svw-audio-element {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .svw-player-controls-row {
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }
    
    .svw-player-controls {
        width: 100%;
        order: 2;
    }
    
    .svw-voting-controls {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
    
    .svw-play-button {
        order: 1;
    }
    
    .svw-song-title {
        padding: 14px 16px 10px;
    }
    
    .svw-title-text {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .svw-player-controls-row {
        padding: 12px;
    }
    
    .svw-play-button {
        width: 45px;
        height: 45px;
    }
    
    .svw-vote-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .svw-song-title {
        padding: 12px 14px 8px;
    }
    
    .svw-title-text {
        font-size: 14px;
    }
}

/* Loading state */
.svw-vote-button.voting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Accessibility */
.svw-vote-button:focus,
.svw-play-button:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .svw-player-main {
        border: 2px solid #000;
    }
    
    .svw-vote-button,
    .svw-play-button {
        border: 1px solid #000;
    }
}
