/**
 * Featured Songs Promoter - Frontend Styles
 * Path: assets/css/frontend.css
 */

/* Grid Container */
.fsp-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.fsp-columns-1 {
    grid-template-columns: 1fr;
}

.fsp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.fsp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fsp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.fsp-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Mobile - always single column */
@media (max-width: 768px) {
    .fsp-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .fsp-columns-3,
    .fsp-columns-4,
    .fsp-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Song Card */
.fsp-song-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fsp-song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Album Art Container */
.fsp-album-art {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.fsp-album-art img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fsp-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
}

/* Hover Icons Overlay */
.fsp-hover-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fsp-album-art:hover .fsp-hover-icons {
    opacity: 1;
}

.fsp-icon-btn {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    padding: 0;
    position: relative;
}

.fsp-icon-btn:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

.fsp-icon-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    color: #333;
}

/* Icon Button Tooltips */
.fsp-icon-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.fsp-icon-btn:hover::after {
    opacity: 1;
}

/* Song Info */
.fsp-song-info {
    padding: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.fsp-info-left {
    flex: 1;
}

.fsp-info-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.fsp-song-card .fsp-artist-photo {
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
    cursor: pointer;
}

.fsp-song-card .fsp-artist-photo:hover {
    opacity: 0.8;
}

.fsp-song-card .fsp-artist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.fsp-song-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.fsp-artist-name {
    margin: 0 0 8px 0;
    font-size: 0.875em;
    color: #666;
    font-weight: 500;
}

.fsp-add-date {
    margin: 0 0 0 0;
    font-size: 13px;
    color: #999;
}

/* Social Icons */
.fsp-social-icons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 116px; 
}

.fsp-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 4px;
    transition: background 0.2s ease;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.fsp-social-icon:hover,
.fsp-social-icon:focus,
.fsp-social-icon:active,
.fsp-social-icon:visited {
    background: #e0e0e0;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.fsp-social-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #555;
}

.fsp-social-icon.fsp-twitter:hover { background: #000; }
.fsp-social-icon.fsp-youtube:hover { background: #FF0000; }
.fsp-social-icon.fsp-facebook:hover { background: #1877F2; }
.fsp-social-icon.fsp-tiktok:hover { background: #000; }
.fsp-social-icon.fsp-instagram:hover { background: #E4405F; }
.fsp-social-icon.fsp-website:hover { background: #333; }

.fsp-social-icon:hover .dashicons {
    color: #fff;
}

/* Chart Info Section */
.fsp-chart-info {
    padding: 15px;
    padding-top: 0;
    border-top: 1px solid #f0f0f0;
}

.fsp-chart-item {
    margin-bottom: 20px;
}

.fsp-chart-item:last-child {
    margin-bottom: 0;
}

.fsp-chart-logo {
    text-align: center;
    margin-bottom: 12px;
}

.fsp-chart-logo img {
    max-width: 150px;
    width: auto;
    height: auto;
    display: inline-block;
}

.fsp-chart-details {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.fsp-chart-details p {
    margin: 0 0 8px 0;
}

.fsp-chart-details p:last-child {
    margin-bottom: 0;
}

/* Mobile Chart Layout */
@media (max-width: 768px) {
    .fsp-chart-logo img {
        max-width: 120px;
    }
}
/* Going for Adds Star Badge */
.fsp-star-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
    line-height: 1;
    transition: background 0.3s ease, transform 0.3s ease;
}

.fsp-star-badge:hover {
    background: linear-gradient(135deg, #28a745, #20c997);
    transform: scale(1.1);
}

/* Modal */
.fsp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fsp-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fsp-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fsp-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #333;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    transition: background 0.2s ease;
}

.fsp-modal-close:hover,
.fsp-modal-close:focus {
    background: #f0f0f0;
}

.fsp-modal-body {
    padding: 20px;
    max-height: calc(90vh - 40px);
    overflow-y: auto;
}

/* Video Container */
.fsp-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.fsp-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Lyrics Container */
.fsp-lyrics-container h2,
.fsp-about-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    color: #333;
}

.fsp-lyrics-container,
.fsp-about-container {
    line-height: 1.8;
    color: #555;
}

.fsp-lyrics-container p,
.fsp-about-container p {
    margin-bottom: 15px;
}

/* Artist Photo Modal */
.fsp-artist-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.fsp-artist-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fsp-artist-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

.fsp-artist-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #333;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    transition: background 0.2s ease;
}

.fsp-artist-modal-close:hover {
    background: #f0f0f0;
}

.fsp-artist-modal img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.fsp-artist-modal h3 {
    margin: 15px 0 0 0;
    text-align: center;
    font-size: 20px;
}

/* Pagination */
.fsp-pagination {
    margin: 40px 0 20px 0;
    text-align: center;
}

.fsp-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.fsp-pagination .page-numbers:hover {
    background: #e0e0e0;
}

.fsp-pagination .page-numbers.current {
    background: #333;
    color: #fff;
}

.fsp-pagination .page-numbers.dots {
    background: transparent;
}

/* Widget Styles */
.fsp-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fsp-widget-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.fsp-widget-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fsp-widget-list a {
    text-decoration: none;
    color: #333;
}

.fsp-widget-list a:hover {
    color: #2271b1;
}

.fsp-widget-artist {
    font-size: 0.9em;
    color: #666;
}

/* Widget/List Items with Thumbnails */
.fsp-widget-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.fsp-widget-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
}

.fsp-widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fsp-widget-content {
    flex: 1;
}

.fsp-widget-title {
    display: block;
    margin-bottom: 2px;
}

/* Going for Adds Shortcode Title */
.fsp-going-for-adds-title {
    margin-bottom: 15px;
    font-size: 20px;
}

.fsp-going-for-adds-list {
    margin-top: 10px;
}

.fsp-going-for-adds-list .fsp-widget-item {
    line-height: 1.0;
}

.fsp-going-for-adds-list .fsp-widget-title {
    line-height: 1.0;
}

.fsp-going-for-adds-list .fsp-widget-artist {
    line-height: 1.0;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .fsp-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .fsp-modal-body {
        padding: 15px;
    }
    
    .fsp-hover-icons {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
    
    .fsp-icon-btn {
        width: 40px;
        height: 40px;
    }
    
    .fsp-icon-btn .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
    
    .fsp-song-info {
        flex-direction: column;
    }
    
    .fsp-info-right {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .fsp-social-icons {
        justify-content: flex-start;
    }
}

/* Print Styles */
@media print {
    .fsp-hover-icons,
    .fsp-modal,
    .fsp-pagination {
        display: none !important;
    }
}