/**
 * ACF Dynamic Tabs Widget Styles
 * Dark theme styling matching the design reference
 */

/* ============================================
   CSS Custom Properties (Theme Variables)
   ============================================ */
.acf-dynamic-tabs {
    --tabs-bg: #1a1a1a;
    --tabs-border: #333333;
    --tab-color: #888888;
    --tab-hover-color: #ffffff;
    --tab-active-color: #ffffff;
    --tab-active-indicator: #4CAF50;
    --content-bg: #1a1a1a;
    --content-color: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ============================================
   Main Container
   ============================================ */
.acf-dynamic-tabs {
    font-family: var(--font-family);
    background: var(--tabs-bg);
    border-radius: 8px;
    overflow: hidden;
}

/* ============================================
   Tab Navigation
   ============================================ */
.acf-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--tabs-bg);
    border-bottom: 1px solid var(--tabs-border);
    padding: 0;
    margin: 0;
    list-style: none;
}

.acf-tabs-nav-item {
    margin: 0;
    padding: 0;
}

.acf-tabs-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    color: var(--tab-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    position: relative;
    white-space: nowrap;
}

.acf-tabs-nav-link:hover {
    color: var(--tab-hover-color);
}

.acf-tabs-nav-link.active {
    color: var(--tab-active-color);
}

.acf-tabs-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--tab-active-indicator);
}

/* Tab Icon */
.acf-tabs-nav-link i,
.acf-tabs-nav-link svg {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.acf-tabs-nav-link .tab-icon-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    flex-shrink: 0;
}

.acf-tabs-nav-link .tab-icon-circle.filled {
    background: currentColor;
}

/* ============================================
   Tab Content Area
   ============================================ */
.acf-tabs-content {
    background: var(--content-bg);
    padding: 30px;
}

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

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Title */
.acf-tab-content-title {
    font-size: 32px;
    font-weight: 300;
    font-style: italic;
    color: var(--tab-active-indicator);
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tabs-border);
}

/* ============================================
   Track Item Styling
   ============================================ */
.acf-track-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--tabs-border);
}

.acf-track-item:last-child {
    border-bottom: none;
}

.acf-track-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

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

.acf-track-info {
    flex: 1;
}

.acf-track-title {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.acf-track-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #888888;
}

.acf-track-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.acf-track-price {
    font-size: 18px;
    font-weight: 500;
    color: var(--tab-active-indicator);
    white-space: nowrap;
}

/* ============================================
   Embed Containers
   ============================================ */
.acf-embed-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

/* Video Embeds (YouTube, Vimeo) */
.acf-embed-container.video-embed {
	position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.acf-embed-container.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Spotify Embed */
.acf-embed-container.spotify-embed iframe {
    width: 100%;
    min-height: 352px;
    border: none;
    border-radius: 12px;
}

.acf-embed-container.spotify-embed.compact iframe {
    min-height: 152px;
}

/* SoundCloud Embed */
.acf-embed-container.soundcloud-embed iframe {
    width: 100%;
    min-height: 166px;
    border: none;
    border-radius: 8px;
}

.acf-embed-container.soundcloud-embed.visual iframe {
    min-height: 300px;
}

/* SoundCloud Profile Embed (All Tracks) */
.acf-embed-container.soundcloud-embed.profile-embed iframe {
    min-height: 400px;
}

.acf-embed-container.soundcloud-embed.profile-embed.visual iframe {
    min-height: 450px;
}

/* ============================================
   Post Content Styling
   ============================================ */
.acf-post-content {
    color: var(--content-color);
    line-height: 1.7;
}

.acf-post-content p {
    margin-bottom: 1.5em;
}

.acf-post-content h1,
.acf-post-content h2,
.acf-post-content h3,
.acf-post-content h4 {
    color: #ffffff;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.acf-post-content a {
    color: var(--tab-active-indicator);
    text-decoration: none;
}

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

.acf-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .acf-tabs-nav {
        flex-direction: column;
    }

    .acf-tabs-nav-link {
        padding: 12px 20px;
        justify-content: flex-start;
        border-bottom: 1px solid var(--tabs-border);
    }

    .acf-tabs-nav-link.active::after {
        display: none;
    }

    .acf-tabs-nav-link.active {
        background: rgba(76, 175, 80, 0.1);
        border-left: 3px solid var(--tab-active-indicator);
    }

    .acf-tabs-content {
        padding: 20px;
    }

    .acf-tab-content-title {
        font-size: 24px;
    }

    .acf-track-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .acf-track-price {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .acf-tabs-nav-link {
        padding: 10px 15px;
        font-size: 12px;
    }

    .acf-tabs-content {
        padding: 15px;
    }

    .acf-track-image {
        width: 60px;
        height: 60px;
    }
}

/* ============================================
   Light Theme Variant
   ============================================ */
.acf-dynamic-tabs.light-theme {
    --tabs-bg: #ffffff;
    --tabs-border: #e0e0e0;
    --tab-color: #666666;
    --tab-hover-color: #333333;
    --tab-active-color: #333333;
    --content-bg: #ffffff;
    --content-color: #333333;
}

/* ============================================
   Elementor Editor Preview
   ============================================ */
.elementor-editor-active .acf-dynamic-tabs {
    min-height: 200px;
}

.elementor-editor-active .acf-tab-panel {
    display: none;
}

.elementor-editor-active .acf-tab-panel:first-child {
    display: block;
}