/**
 * Commodity Tabs Styles
 *
 * Dynamic tabs for commodities in a vertical.
 *
 * @package PLUM_Core
 */

/* Tab Container */
.ppcore-commodity-tabs {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #131314;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Tab Navigation */
.ppcore-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    background: 5600b1;
    padding: 8px 8px 0;
    border-bottom: 1px solid #390791;
}

.ppcore-tab-btn {
    padding: 0 20px;
    background: #370058;
    border: none;
    border-radius: 6px 6px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ppcore-tab-btn:hover {
    color: #fff;
    background: rgba(56, 0, 58, 0.5);
}

.ppcore-tab-btn.ppcore-tab-active {
    background: #58008b;
    color: #fff;
    font-weight: 600;
}

.ppcore-tab-btn.ppcore-tab-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #370058, #8b5cf6);
}

.ppcore-tab-btn:focus {
    outline: 2px solid #370058;
    outline-offset: 2px;
}

/* Tab Panels */
.ppcore-tabs-panels {
    padding: 0;
}

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

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

@keyframes ppcore-fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

/* Tab Content */
.ppcore-tab-content {
    padding: 0;
}

/* Ticker Section (full-width) */
.ppcore-tab-ticker {
    padding: 0;
    margin: 0;
}

.ppcore-tab-ticker .ppcore-ticker-tape {
    border-radius: 0;
    border: none;
}

/* Content Sections */
.ppcore-tab-section {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ppcore-tab-section:last-child {
    border-bottom: none;
}

.ppcore-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #efefef;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Two Column Layout */
.ppcore-tab-columns {
    display: flex;
    gap: 0;
}

.ppcore-column-articles {
    flex: 0 0 65%;
    max-width: 65%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ppcore-column-commentary {
    flex: 0 0 35%;
    max-width: 35%;
}

.ppcore-tab-columns .ppcore-tab-section {
    border-bottom: none;
}

/* Heards Sections */
.ppcore-heards-top,
.ppcore-heards-bottom {
    background: rgba(255, 255, 255, 0.02);
}

.ppcore-heards-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Articles List */
.ppcore-articles-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ppcore-article-item {
    border-bottom: 1px solid #f5f5f5;
}

.ppcore-article-item:last-child {
    border-bottom: none;
}

.ppcore-article-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ppcore-article-link:hover {
    padding-left: 8px;
}

.ppcore-article-title {
    color: #EBEBEB;
    font-weight: 500;
    flex: 1;
    margin-right: 16px;
}

.ppcore-article-link:hover .ppcore-article-title {
    color: #3b82f6;
}

.ppcore-article-date {
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
}

/* No Data State */
.ppcore-no-data {
    color: #9ca3af;
    font-style: italic;
    padding: 8px 0;
    margin: 0;
    background-color: #351342;
}

/* Responsive */
@media (max-width: 768px) {
    .ppcore-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ppcore-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .ppcore-tab-btn {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 13px;
    }

    .ppcore-tab-section {
        padding: 16px;
    }

    .ppcore-article-link {
        flex-direction: column;
        align-items: flex-start;
    }

    .ppcore-article-title {
        margin-right: 0;
        margin-bottom: 4px;
    }
}