/* Music Share Plugin - Frontend Styles - Table Layout */

.music-share-library {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
}

.music-library-title {
    font-size: 28px;
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 10px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Table Styles */
.music-track-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    display: table !important;
}

.music-track-table thead {
    background: #f5f5f5;
    display: table-header-group !important;
}

.music-track-table tbody {
    display: table-row-group !important;
}

.music-track-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
    display: table-row !important;
}

.music-track-table tbody tr:hover {
    background-color: #f9f9f9;
}

.music-track-table tbody tr:last-child {
    border-bottom: none;
}

.music-track-table th,
.music-track-table td {
    display: table-cell !important;
}

.music-track-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #0073aa;
    font-size: 14px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.music-track-table td {
    padding: 15px;
    vertical-align: middle;
    font-size: 14px;
}

/* Column Widths - Desktop */
.col-title {
    width: 25% !important;
}

.col-song {
    width: 35% !important;
}

.col-instrumental {
    width: 30% !important;
}

.col-lyrics {
    width: 10% !important;
    text-align: center !important;
}

/* Title Cell */
.track-title-cell strong {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Audio Players - Desktop */
.track-song-cell audio,
.track-instrumental-cell audio {
    width: 100%;
    max-width: 100%;
    height: 32px;
}

/* No Content Text */
.no-instrumental,
.no-lyrics {
    color: #999;
    font-style: italic;
    font-size: 13px;
    display: block;
    text-align: center;
}

/* Lyrics Download Button */
.track-lyrics-cell {
    text-align: center;
}

.lyrics-download-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
}

.lyrics-download-btn:hover {
    background: #005a87 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.lyrics-download-btn:visited,
.lyrics-download-btn:focus {
    color: #fff !important;
}

/* No Tracks Message */
.no-tracks-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 14px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Responsive Design - Tablets */
@media screen and (max-width: 1024px) {
    .col-title {
        width: 20%;
    }
    
    .col-song {
        width: 35%;
    }
    
    .col-instrumental {
        width: 30%;
    }
    
    .col-lyrics {
        width: 15%;
    }
}

/* Responsive Design - Mobile Landscape & Small Tablets */
/* ONLY activate on ACTUAL mobile devices */
@media screen and (max-width: 768px) {
    .music-share-library {
        max-width: 100%;
        padding: 12px 8px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .music-library-title {
        font-size: 22px;
        padding: 0 8px 12px 8px;
    }
    
    /* Stack table on mobile - ONLY on small screens */
    body .music-track-table,
    body .music-track-table thead,
    body .music-track-table tbody,
    body .music-track-table th,
    body .music-track-table td,
    body .music-track-table tr {
        display: block !important;
    }
    
    body .music-track-table thead {
        display: none !important;
    }
    
    .music-track-table tbody tr {
        margin-bottom: 18px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 12px;
        background: #fafafa;
    }
    
    .music-track-table td {
        padding: 10px 0;
        border: none;
        text-align: left !important;
    }
    
    .music-track-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 8px;
        color: #555;
        font-size: 13px;
    }
    
    .track-title-cell:before {
        content: "Title:";
    }
    
    .track-song-cell:before {
        content: "Song:";
    }
    
    .track-instrumental-cell:before {
        content: "Instrumental:";
    }
    
    .track-lyrics-cell:before {
        content: "Lyrics:";
    }
    
    /* Mobile Audio Players - Optimized */
    .track-song-cell audio,
    .track-instrumental-cell audio {
        width: 100% !important;
        max-width: 100% !important;
        height: 42px !important;
        display: block;
        margin: 8px 0;
    }
    
    /* Cell spacing for mobile */
    .track-song-cell,
    .track-instrumental-cell {
        padding: 12px 0 !important;
    }
    
    /* Download button mobile styling */
    .lyrics-download-btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 14px;
        margin-top: 8px;
        box-sizing: border-box !important;
        display: block;
    }
    
    /* Lyrics cell container fix */
    .track-lyrics-cell {
        padding: 12px 0 !important;
        text-align: left !important;
    }
    
    /* Title more prominent on mobile */
    .track-title-cell strong {
        font-size: 17px;
        display: block;
        margin-bottom: 4px;
    }
}

/* Responsive Design - Mobile Portrait (Phones) */
@media screen and (max-width: 480px) {
    .music-share-library {
        padding: 10px 5px;
    }
    
    .music-library-title {
        font-size: 20px;
        padding: 0 5px 10px 5px;
    }
    
    .music-track-table tbody tr {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    /* Larger touch targets for phones */
    .track-song-cell audio,
    .track-instrumental-cell audio {
        height: 48px !important;
        margin: 10px 0;
    }
    
    /* Slightly larger title on small phones */
    .track-title-cell strong {
        font-size: 16px;
    }
    
    /* Bigger buttons for easier tapping */
    .lyrics-download-btn {
        padding: 14px 24px;
        font-size: 15px;
        box-sizing: border-box !important;
        width: 100%;
        max-width: 100%;
    }
    
    /* Labels more compact */
    .music-track-table td:before {
        font-size: 12px;
        margin-bottom: 6px;
    }
}

/* Responsive Design - Very Small Phones */
@media screen and (max-width: 360px) {
    .music-library-title {
        font-size: 18px;
    }
    
    .track-title-cell strong {
        font-size: 15px;
    }
    
    /* Maximum touch-friendly sizing */
    .track-song-cell audio,
    .track-instrumental-cell audio {
        height: 50px !important;
    }
}
