/**
 * Song Requests Plugin - Public Styles
 *
 * @package    Song_Requests
 * @author     Adam Rahuba <adam@metalcorenight.com>
 * @since      1.0.0
 */

/* ==========================================================================
   Song Requests Container
   ========================================================================== */

.sr-song-requests-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Map Container
   ========================================================================== */

.sr-map-container {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sr-map {
    width: 100%;
    min-height: 400px;
}

/* ==========================================================================
   Requests List
   ========================================================================== */

.sr-requests-list {
    margin-top: 20px;
}

.sr-requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .sr-requests-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.sr-no-requests {
    text-align: center;
    padding: 40px;
    font-style: italic;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ==========================================================================
   Request Item
   ========================================================================== */

.sr-request-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sr-request-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.sr-request-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ==========================================================================
   Album Art
   ========================================================================== */

.sr-album-art {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.sr-album-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sr-default-album-art {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sr-music-icon {
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Song Information
   ========================================================================== */

.sr-song-info {
    text-align: center;
}

.sr-song-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.sr-artist-name {
    font-size: 16px;
    color: #666;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.sr-location {
    font-size: 14px;
    color: #888;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.sr-location-icon {
    font-size: 12px;
}

.sr-request-date {
    font-size: 12px;
    color: #aaa;
    margin: 0;
    font-style: italic;
}

/* ==========================================================================
   Spotify Link
   ========================================================================== */

.sr-spotify-link {
    display: flex;
    justify-content: center;
}

.sr-spotify-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #1db954;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.sr-spotify-btn:hover {
    background: #1ed760;
    color: white;
    text-decoration: none;
}

.sr-spotify-icon {
    font-size: 16px;
}

/* ==========================================================================
   Voting Section
   ========================================================================== */

.sr-voting-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 15px;
}

.sr-voting-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sr-vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
    position: relative;
}

.sr-vote-btn:hover {
    border-color: #007cba;
    background: #f8f9fa;
    transform: scale(1.05);
}

.sr-vote-btn:active {
    transform: scale(0.95);
}

.sr-vote-btn.voted {
    border-color: #007cba;
    background: #e7f3ff;
}

.sr-vote-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.sr-emoji {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 4px;
}

.sr-vote-count {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    line-height: 1;
}

.sr-vote-btn:hover .sr-vote-count {
    color: #007cba;
}

/* ==========================================================================
   Load More
   ========================================================================== */

.sr-load-more-container {
    text-align: center;
    margin-top: 30px;
}

.sr-load-more-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sr-load-more-btn:hover {
    background: #005a87;
}

.sr-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sr-load-more-btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 480px) {
    .sr-song-requests-container {
        padding: 15px;
    }
    
    .sr-request-item {
        padding: 15px;
    }
    
    .sr-album-image,
    .sr-default-album-art {
        width: 100px;
        height: 100px;
    }
    
    .sr-music-icon {
        font-size: 40px;
    }
    
    .sr-song-title {
        font-size: 16px;
    }
    
    .sr-artist-name {
        font-size: 14px;
    }
    
    .sr-voting-buttons {
        gap: 4px;
    }
    
    .sr-vote-btn {
        min-width: 45px;
        padding: 8px 6px;
    }
    
    .sr-emoji {
        font-size: 20px;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.sr-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.sr-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Error States
   ========================================================================== */

.sr-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c66;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

/* ==========================================================================
   Success States
   ========================================================================== */

.sr-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #6c6;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-vote-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.sr-load-more-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .sr-request-item {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .sr-song-title {
        color: #f0f0f0;
    }
    
    .sr-artist-name {
        color: #ccc;
    }
    
    .sr-location {
        color: #aaa;
    }
    
    .sr-request-date {
        color: #888;
    }
    
    .sr-vote-btn {
        border-color: #555;
        color: #e0e0e0;
    }
    
    .sr-vote-btn:hover {
        background: #333;
        border-color: #007cba;
    }
    
    .sr-no-requests {
        background: #333;
        color: #ccc;
    }
}