/**
 * WooCommerce Blog Section
 *
 * Blog tabs, context, stats, blog card, and posts list styles
 *
 * @package BadassNetwork
 */

/* ==========================================================================
   BLOG TABS (for multiple sites)
   ========================================================================== */

body.woocommerce-account .blog-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border: 3px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: 3px 3px 0 var(--color-border);
    overflow-x: auto;
}

body.woocommerce-account .blog-tab,
body.woocommerce-account a.blog-tab,
body.woocommerce-account .entry-content a.blog-tab {
    padding: 14px 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-text-soft) !important;
    text-decoration: none !important;
    border-right: 3px solid var(--color-border);
    border-bottom: none !important;
    white-space: nowrap;
    transition: all 0.15s ease;
}

body.woocommerce-account .blog-tab:last-child {
    border-right: none;
}

body.woocommerce-account .blog-tab:hover,
body.woocommerce-account a.blog-tab:hover,
body.woocommerce-account .entry-content a.blog-tab:hover {
    background: var(--color-bg);
    color: var(--color-text) !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

body.woocommerce-account .blog-tab.is-active,
body.woocommerce-account a.blog-tab.is-active,
body.woocommerce-account .entry-content a.blog-tab.is-active {
    background: var(--color-mint);
    color: var(--color-text) !important;
}

/* ==========================================================================
   BLOG CONTEXT BAR
   ========================================================================== */

body.woocommerce-account .blog-context {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: var(--color-bg);
    border: 3px solid var(--color-border);
    box-shadow: 3px 3px 0 var(--color-border);
}

body.woocommerce-account .blog-context-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.woocommerce-account .blog-context-name {
    font-weight: 800;
    font-size: 16px;
}

body.woocommerce-account .blog-context-role {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    background: var(--color-lavender);
    border: 2px solid var(--color-border);
}

body.woocommerce-account .blog-context-actions {
    display: flex;
    gap: 8px;
}

body.woocommerce-account .blog-action-link,
body.woocommerce-account a.blog-action-link,
body.woocommerce-account .entry-content a.blog-action-link {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border) !important;
    text-decoration: none !important;
    color: var(--color-text) !important;
    transition: all 0.15s ease;
}

body.woocommerce-account .blog-action-link:hover,
body.woocommerce-account a.blog-action-link:hover,
body.woocommerce-account .entry-content a.blog-action-link:hover {
    background: var(--color-mint);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--color-border);
    text-decoration: none !important;
    color: var(--color-text) !important;
    border-bottom: 2px solid var(--color-border) !important;
}

/* ==========================================================================
   BLOG STATS
   ========================================================================== */

body.woocommerce-account .blog-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

body.woocommerce-account .blog-stat-card {
    background: var(--color-surface);
    border: 3px solid var(--color-border);
    box-shadow: 3px 3px 0 var(--color-border);
    padding: 20px;
    text-align: center;
}

body.woocommerce-account .blog-stat-value {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
}

body.woocommerce-account .blog-stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--color-text-soft);
    margin-top: 4px;
}

/* ==========================================================================
   BLOG CARD
   ========================================================================== */

body.woocommerce-account .blog-card {
    background: var(--color-surface);
    border: 3px solid var(--color-border);
    box-shadow: var(--shadow);
}

body.woocommerce-account .blog-card .blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 3px solid var(--color-border);
    background: var(--color-bg);
}

body.woocommerce-account .blog-card .blog-header .activity-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
}

/* ==========================================================================
   POSTS LIST
   ========================================================================== */

body.woocommerce-account .blog-card .posts-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-account .blog-card .posts-list .post-item {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 20px 24px !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 3px dashed var(--color-border) !important;
    background: transparent;
    transition: background 0.15s ease;
}

body.woocommerce-account .blog-card .posts-list .post-item::before,
body.woocommerce-account .blog-card .posts-list .post-item::after {
    display: none !important;
    content: none !important;
}

body.woocommerce-account .blog-card .posts-list .post-item:last-child {
    border-bottom: none !important;
}

body.woocommerce-account .blog-card .posts-list .post-item:hover {
    background: var(--color-bg);
}

/* ==========================================================================
   POST STATUS INDICATOR
   ========================================================================== */

body.woocommerce-account .blog-card .post-status {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    background: var(--color-mint) !important;
    border: 2px solid var(--color-border) !important;
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.woocommerce-account .blog-card .post-status.draft {
    background: var(--color-sun) !important;
}

body.woocommerce-account .blog-card .post-status.pending {
    background: var(--color-peach) !important;
}

body.woocommerce-account .blog-card .post-status.published {
    background: var(--color-mint) !important;
}

/* ==========================================================================
   POST CONTENT
   ========================================================================== */

body.woocommerce-account .blog-card .post-content {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

body.woocommerce-account .blog-card .post-title {
    font-weight: 700 !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    border: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.woocommerce-account .blog-card .post-meta {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    color: var(--color-text-soft) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

body.woocommerce-account .blog-card .post-views {
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-align: right !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    color: var(--color-text-soft) !important;
}

/* ==========================================================================
   POST ACTIONS
   ========================================================================== */

body.woocommerce-account .blog-card .post-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

body.woocommerce-account .blog-card .post-action-btn,
body.woocommerce-account .blog-card a.post-action-btn,
body.woocommerce-account .entry-content a.post-action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: var(--color-surface) !important;
    border: 2px solid var(--color-border) !important;
    border-bottom: 2px solid var(--color-border) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: all 0.15s ease !important;
    opacity: 0.6 !important;
    color: var(--color-text) !important;
}

body.woocommerce-account .blog-card .post-item:hover .post-action-btn {
    opacity: 1 !important;
}

body.woocommerce-account .blog-card .post-action-btn:hover,
body.woocommerce-account .blog-card a.post-action-btn:hover,
body.woocommerce-account .entry-content a.post-action-btn:hover {
    background: var(--color-mint) !important;
    transform: translate(-1px, -1px) !important;
    box-shadow: 2px 2px 0 var(--color-border) !important;
    text-decoration: none !important;
    color: var(--color-text) !important;
    border-bottom: 2px solid var(--color-border) !important;
}

/* ==========================================================================
   BLOG HEADER - MANAGE ALL LINK
   ========================================================================== */

body.woocommerce-account .blog-card .blog-header .blog-url,
body.woocommerce-account .blog-card .blog-header a.blog-url,
body.woocommerce-account .entry-content a.blog-url {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    background: var(--color-surface);
    padding: 8px 14px;
    border: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border) !important;
    text-decoration: none !important;
    color: var(--color-text) !important;
    transition: all 0.15s ease;
}

body.woocommerce-account .blog-card .blog-header a.blog-url:hover,
body.woocommerce-account .entry-content a.blog-url:hover {
    background: var(--color-mint);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--color-border);
    text-decoration: none !important;
    color: var(--color-text) !important;
    border-bottom: 2px solid var(--color-border) !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 600px) {
    body.woocommerce-account .blog-context {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    body.woocommerce-account .blog-context-info {
        flex-direction: column;
        gap: 8px;
    }
    
    body.woocommerce-account .blog-tabs {
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    body.woocommerce-account .blog-card .post-item {
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-account .blog-card .post-actions {
        width: 100% !important;
        justify-content: flex-end !important;
        margin-top: 8px !important;
        padding-left: 28px !important;
    }
    
    body.woocommerce-account .blog-card .post-views {
        margin-right: auto !important;
    }
}

