/* Category Tabs Block */
.wegreen-tabs-category {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Sidebar Header - default styling, overridden by inline styles */
.wegreen-tabs-header {
    background: #dc2626;
    color: white;
    padding: 12px 16px;
}

.wegreen-tabs-header h2 {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0!important;
}

/* Tabs Navigation */
.wegreen-tabs-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
}

.wegreen-tab-btn {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;

}

.wegreen-tab-btn.active {
    background: white;
    /* Color is set dynamically to match the header */
}

.wegreen-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    /* Background color is set dynamically to match the header */
}

.wegreen-tab-btn:hover:not(.active) {
    background: #f1f5f9;
}

/* Tabs Content */
.wegreen-tabs-content {
    background: #fff;
}

.wegreen-tab-pane {
    display: none;
    padding: 16px;
}

.wegreen-tab-pane.active {
    display: block;
}

/* Post Layout */
.wegreen-tab-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.wegreen-tab-post {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.wegreen-tab-post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.wegreen-tab-post-image {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
    overflow: hidden;
}

.wegreen-tab-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.wegreen-tab-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    min-height: 120px;
}

.wegreen-tab-post-content {
    padding: 8px;
}

.wegreen-tab-post-title {
    font-size: 13px!important;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px!important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wegreen-tab-post-title a {
    color: #111827;
    text-decoration: none;
}

.wegreen-tab-post-title a:hover {
    color: #dc2626;
}

.wegreen-tab-post-meta {
    font-size: 11px;
    color: #6b7280;
}

.wegreen-tab-post-excerpt {
    display: none;
}

.wegreen-tab-more {
    margin-top: 16px;
    text-align: center;
}

.wegreen-tab-more-link {
    display: inline-block;
    padding: 8px 16px;
    background: #dc2626;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.wegreen-tab-more-link:hover {
    background: #b91c1c;
    color: #fff;
}

.wegreen-tab-more-link:disabled {
    background: #e0e0e0;
    color: #888;
    cursor: not-allowed;
}

/* Editor specific styles */
.wegreen-tabs-category-block {
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
}

/* Responsive Design - Maintain desktop layout */
@media (max-width: 768px) {
    .wegreen-tab-posts {
        grid-template-columns: repeat(3, 1fr);
    }

    
    .wegreen-tab-post-meta {
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .wegreen-tabs-category {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .wegreen-tab-posts {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .wegreen-tabs-nav {
        flex-wrap: nowrap;
    }
    
    .wegreen-tab-btn {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .wegreen-tab-pane {
        padding: 8px;
    }
    
    .wegreen-tab-post-content {
        padding: 6px;
    }
    
    .wegreen-tab-more-link {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Extra small screens */
@media (max-width: 375px) {
    .wegreen-tab-posts {
        grid-template-columns: repeat(3, 1fr);
    }
} 