/* ACF Tabs Widget Styles */
.acf-tabs-widget {
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Navigation Tabs */
.acf-tabs-navigation {
    display: flex;
    background-color: #2a2a2a;
    border-radius: 8px 8px 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    padding: 0;
    margin: 0;
}

.acf-tabs-navigation::-webkit-scrollbar {
    height: 4px;
}

.acf-tabs-navigation::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.acf-tabs-navigation::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.acf-tab-link {
    flex: 0 0 auto;
    padding: 18px 32px;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.acf-tab-link i {
    font-size: 16px;
    opacity: 0.8;
}

.acf-tab-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.acf-tab-link.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
}

/* Content Area */
.acf-tabs-content {
    background-color: #1a1a1a;
    padding: 0;
    border-radius: 0 0 8px 8px;
    min-height: 300px;
}

.acf-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.acf-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Track Items List */
.acf-tracks-list {
    padding: 0;
    margin: 0;
}

.acf-track-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    gap: 16px;
}

.acf-track-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.acf-track-item:first-child {
    border-radius: 0;
}

.acf-track-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* Track Image */
.acf-track-image {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
}

.acf-track-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Track Info */
.acf-track-info {
    flex: 1;
    min-width: 0;
}

.acf-track-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acf-track-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.acf-track-title a:hover {
    color: #4a9eff;
}

.acf-track-subtitle {
    font-size: 13px;
    color: #cccccc;
    margin-bottom: 4px;
}

.acf-track-meta {
    font-size: 11px;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Track Details */
.acf-track-details {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.acf-track-duration {
    font-size: 13px;
    color: #999999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acf-track-duration i {
    opacity: 0.6;
}

.acf-track-price {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Editor Content */
.acf-editor-content {
    padding: 32px 24px;
    color: #ffffff;
    line-height: 1.8;
}

.acf-editor-content p {
    margin-bottom: 16px;
    color: #cccccc;
}

.acf-editor-content h1,
.acf-editor-content h2,
.acf-editor-content h3,
.acf-editor-content h4,
.acf-editor-content h5,
.acf-editor-content h6 {
    color: #ffffff;
    margin-top: 24px;
    margin-bottom: 12px;
}

.acf-editor-content a {
    color: #4a9eff;
    text-decoration: none;
}

.acf-editor-content a:hover {
    text-decoration: underline;
}

.acf-editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.acf-editor-content ul,
.acf-editor-content ol {
    margin-left: 24px;
    margin-bottom: 16px;
    color: #cccccc;
}

/* Video Wrapper */
.acf-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
}

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

/* Embed Wrapper */
.acf-embed-wrapper {
    padding: 24px;
    background-color: #1a1a1a;
    border-radius: 0 0 8px 8px;
}

.acf-embed-wrapper iframe {
    max-width: 100%;
    border-radius: 8px;
}

/* Spotify Embed */
.acf-embed-wrapper iframe[src*="spotify"] {
    border-radius: 12px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .acf-tab-link {
        padding: 14px 20px;
        font-size: 12px;
    }

    .acf-track-item {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .acf-track-image {
        flex: 0 0 50px;
        width: 50px;
        height: 50px;
    }

    .acf-track-info {
        flex: 1;
        min-width: 150px;
    }

    .acf-track-details {
        flex: 1 0 100%;
        justify-content: space-between;
        padding-left: 66px;
    }

    .acf-track-title {
        font-size: 14px;
    }

    .acf-track-subtitle {
        font-size: 12px;
    }

    .acf-editor-content {
        padding: 24px 16px;
    }
}

@media screen and (max-width: 480px) {
    .acf-tabs-navigation {
        border-radius: 0;
    }

    .acf-tabs-content {
        border-radius: 0;
    }

    .acf-tab-link {
        padding: 12px 16px;
        font-size: 11px;
    }

    .acf-track-item {
        padding: 12px;
    }

    .acf-track-details {
        padding-left: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .acf-track-price {
        font-size: 12px;
        padding: 4px 12px;
    }
}

/* Loading State */
.acf-tabs-widget.loading {
    opacity: 0.6;
    pointer-events: none;
}

.acf-tabs-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Dark Theme Enhancements */
.acf-tabs-widget * {
    box-sizing: border-box;
}

/* Smooth scrolling for tabs */
.acf-tabs-navigation {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.acf-tab-link:focus {
    outline: 2px solid #4a9eff;
    outline-offset: -2px;
}

.acf-track-item a:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* Selection styling */
.acf-tabs-widget ::selection {
    background-color: rgba(74, 158, 255, 0.3);
    color: #ffffff;
}
