/**
 * Beatport Integration - Frontend Styles
 *
 * @package ProDjBeat_Beatport
 * @since 1.0.0
 */

/* ==========================================================================
   Variables CSS
   ========================================================================== */
:root {
    --bp-primary: #00d4aa;
    --bp-primary-dark: #00a88a;
    --bp-secondary: #1a1a2e;
    --bp-dark: #0f0f1a;
    --bp-light: #f8f9fa;
    --bp-gray: #6c757d;
    --bp-border: rgba(255, 255, 255, 0.1);
    --bp-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --bp-radius: 8px;
    --bp-transition: all 0.3s ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
.bp-release,
.bp-track-card,
.bp-artist {
    background: var(--bp-secondary);
    border-radius: var(--bp-radius);
    overflow: hidden;
    box-shadow: var(--bp-shadow);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ==========================================================================
   Card Style
   ========================================================================== */
.bp-card {
    display: flex;
    flex-direction: column;
}

.bp-card .bp-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.bp-card .bp-artwork {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--bp-transition);
}

.bp-card:hover .bp-artwork {
    transform: scale(1.05);
}

.bp-card .bp-content {
    padding: 20px;
}

/* ==========================================================================
   Full Style
   ========================================================================== */
.bp-full {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .bp-full {
        grid-template-columns: 1fr;
    }
}

.bp-full .bp-cover {
    border-radius: var(--bp-radius);
    overflow: hidden;
}

.bp-full .bp-artwork {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Compact Style
   ========================================================================== */
.bp-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px;
}

.bp-compact .bp-cover {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.bp-compact .bp-artwork {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-compact .bp-content {
    flex: 1;
    padding: 0;
}

.bp-compact .bp-title {
    font-size: 14px;
    margin: 0 0 5px 0;
}

.bp-compact .bp-artists {
    font-size: 12px;
    margin: 0;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
.bp-header {
    margin-bottom: 15px;
}

.bp-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.bp-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--bp-transition);
}

.bp-title a:hover {
    color: var(--bp-primary);
}

.bp-artists {
    font-size: 1.1rem;
    color: var(--bp-primary);
    margin: 0 0 10px 0;
}

.bp-remixers {
    font-size: 0.9rem;
    color: var(--bp-gray);
    margin: 0 0 10px 0;
}

.bp-remixers small {
    margin-right: 5px;
}

.bp-mix-name {
    color: var(--bp-gray);
    font-weight: 400;
    font-size: 0.9em;
}

/* ==========================================================================
   Meta Information
   ========================================================================== */
.bp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--bp-gray);
}

.bp-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bp-track-meta {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    font-size: 0.85rem;
}

.bp-track-meta span {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.bp-track-specs {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.bp-track-specs span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--bp-gray);
}

.bp-bpm,
.bp-key,
.bp-duration {
    font-family: 'Monaco', 'Consolas', monospace;
}

/* ==========================================================================
   Tracklist
   ========================================================================== */
.bp-tracklist {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bp-border);
}

.bp-tracklist-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: var(--bp-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bp-tracks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-track {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bp-border);
    transition: var(--bp-transition);
}

.bp-track:last-child {
    border-bottom: none;
}

.bp-track:hover {
    background: rgba(255, 255, 255, 0.05);
    margin: 0 -15px;
    padding: 12px 15px;
}

.bp-track-number {
    width: 30px;
    font-size: 0.9rem;
    color: var(--bp-gray);
    flex-shrink: 0;
}

.bp-track-info {
    flex: 1;
    min-width: 0;
}

.bp-track-title {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-track-artists {
    display: block;
    font-size: 0.85rem;
    color: var(--bp-gray);
}

.bp-track-details {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--bp-gray);
    flex-shrink: 0;
    margin-left: 15px;
}

.bp-track-duration,
.bp-track-bpm,
.bp-track-key {
    font-family: 'Monaco', 'Consolas', monospace;
}

/* ==========================================================================
   Artist Styles
   ========================================================================== */
.bp-artist-header {
    display: flex;
    gap: 30px;
    padding: 30px;
}

@media (max-width: 600px) {
    .bp-artist-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.bp-artist-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.bp-artist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-artist-info {
    flex: 1;
}

.bp-artist-name {
    font-size: 2rem;
    margin: 0 0 15px 0;
}

.bp-artist-bio {
    color: var(--bp-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.bp-artist-releases {
    padding: 30px;
    border-top: 1px solid var(--bp-border);
}

.bp-section-title {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
}

.bp-releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.bp-release-mini {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--bp-transition);
}

.bp-release-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.bp-release-mini img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.bp-release-mini-info {
    padding: 10px;
}

.bp-release-mini-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-release-mini-label {
    display: block;
    font-size: 0.75rem;
    color: var(--bp-gray);
}

/* ==========================================================================
   Footer & Buttons
   ========================================================================== */
.bp-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--bp-border);
}

.bp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bp-primary);
    color: var(--bp-dark);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--bp-transition);
}

.bp-btn:hover {
    background: var(--bp-primary-dark);
    color: var(--bp-dark);
    transform: translateY(-2px);
}

.bp-btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ==========================================================================
   Play Button
   ========================================================================== */
.bp-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 212, 170, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: var(--bp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-cover:hover .bp-play-btn {
    opacity: 1;
}

.bp-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--bp-primary);
}

.bp-play-btn .bp-icon-play {
    font-size: 24px;
    color: var(--bp-dark);
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */
.bp-grid {
    display: grid;
    gap: 20px;
}

.bp-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.bp-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.bp-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .bp-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bp-grid-3,
    .bp-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bp-grid-2,
    .bp-grid-3,
    .bp-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Search Results
   ========================================================================== */
.bp-search-results {
    margin: 20px 0;
}

.bp-results-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bp-border);
}

.bp-results-count {
    color: var(--bp-gray);
    font-size: 0.9rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.bp-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.bp-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bp-secondary);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--bp-transition);
}

.bp-page-link:hover,
.bp-page-link.bp-active {
    background: var(--bp-primary);
    color: var(--bp-dark);
}

.bp-pagination-dots {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: var(--bp-gray);
}

/* ==========================================================================
   States
   ========================================================================== */
.bp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--bp-gray);
}

.bp-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--bp-border);
    border-top-color: var(--bp-primary);
    border-radius: 50%;
    animation: bp-spin 1s linear infinite;
}

@keyframes bp-spin {
    to {
        transform: rotate(360deg);
    }
}

.bp-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 15px 20px;
    border-radius: var(--bp-radius);
}

.bp-no-results {
    text-align: center;
    padding: 40px;
    color: var(--bp-gray);
}

/* ==========================================================================
   Description
   ========================================================================== */
.bp-description {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--bp-gray);
}

/* ==========================================================================
   Icons (usando Unicode o pseudo-elementos)
   ========================================================================== */
.bp-icon::before {
    font-family: inherit;
    font-style: normal;
}

.bp-icon-label::before { content: "🏷️"; }
.bp-icon-calendar::before { content: "📅"; }
.bp-icon-catalog::before { content: "#"; }
.bp-icon-genre::before { content: "🎵"; }
.bp-icon-time::before { content: "⏱️"; }
.bp-icon-bpm::before { content: "💓"; }
.bp-icon-key::before { content: "🎹"; }
.bp-icon-beatport::before { content: "🎧"; }
.bp-icon-play::before { content: "▶"; }

/* ==========================================================================
   Light Theme Override (opcional)
   ========================================================================== */
.bp-theme-light .bp-release,
.bp-theme-light .bp-track-card,
.bp-theme-light .bp-artist {
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
}

.bp-theme-light .bp-title a {
    color: #333;
}

.bp-theme-light .bp-artists {
    color: #0066cc;
}

.bp-theme-light .bp-meta,
.bp-theme-light .bp-track-artists,
.bp-theme-light .bp-track-details {
    color: #666;
}
