/* ================================================================
   PrepsNext Category Badges — badge.css
   Badges render BELOW post titles, never inline.
   Color: CSS custom property --pncb-color set per badge via PHP/JS.
   Icon SVG is white-filtered for readability on dark badges.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&display=swap');

/* ── Wrapper: block-level, sits BELOW the title ── */
.pncb-badge-wrap {
    display: block;
    margin-top: 5px;
    margin-bottom: 6px;
    line-height: 1;
}

/* ── Inner title span (keeps title text on its own line) ── */
.pncb-title-inner {
    display: block;
}

/* ── The badge link itself ── */
.pncb-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1;
    color: #ffffff !important;
    background-color: var(--pncb-color, #0d1b2a);
    padding: 3px 8px 3px 6px;
    border-radius: 2px;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.22);
    transition: filter 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Subtle left accent stripe */
.pncb-badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(255,255,255,0.25);
}

.pncb-badge:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none !important;
}

/* ── SVG icon inside badge ── */
.pncb-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    vertical-align: middle;
    filter: brightness(0) invert(1);  /* force white */
    object-fit: contain;
}

/* ── Label text ── */
.pncb-label {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* ════════════════════════════════════════════
   ZoxPress Layout Contexts
   ════════════════════════════════════════════ */

/* Featured / hero card — slightly larger badge */
.zox-main-article .pncb-badge,
.zox-feat-art     .pncb-badge,
[class*="zox-hero"] .pncb-badge,
.zox-art-wrap.zox-full-art .pncb-badge {
    font-size: 11px;
    padding: 4px 10px 4px 8px;
    gap: 6px;
}
.zox-main-article .pncb-icon,
.zox-feat-art     .pncb-icon {
    width: 14px;
    height: 14px;
}

/* Small sidebar / widget strip cards */
.zox-sm-art-wrap   .pncb-badge,
.zox-sm-post       .pncb-badge,
.widget            .pncb-badge,
.widget_recent_entries .pncb-badge {
    font-size: 9px;
    padding: 2px 6px 2px 5px;
    gap: 4px;
}
.zox-sm-art-wrap .pncb-icon,
.widget          .pncb-icon {
    width: 10px;
    height: 10px;
}

/* Trending strip */
.zox-trending      .pncb-badge,
[class*="trending"] .pncb-badge {
    font-size: 9px;
    padding: 2px 7px 2px 5px;
}

/* ── WordPress native widgets ── */
.wp-block-latest-posts .pncb-badge-wrap,
.widget_recent_entries li .pncb-badge-wrap {
    margin-top: 3px;
    margin-bottom: 4px;
}

/* ── Post title wrappers ── */
/* When ZoxPress has title inside a link, we preserve layout */
h1 > .pncb-title-inner,
h2 > .pncb-title-inner,
h3 > .pncb-title-inner,
h4 > .pncb-title-inner,
h5 > .pncb-title-inner,
h6 > .pncb-title-inner {
    display: block;
}

/* Ensure the badge-wrap clears the title */
h1 + .pncb-badge-wrap,
h2 + .pncb-badge-wrap,
h3 + .pncb-badge-wrap,
h4 + .pncb-badge-wrap,
h5 + .pncb-badge-wrap,
h6 + .pncb-badge-wrap {
    margin-top: 4px;
}

/* ── Dark card overlay contexts ── */
[class*="dark"] .pncb-badge,
.dark           .pncb-badge {
    box-shadow: 0 1px 5px rgba(0,0,0,0.45);
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .pncb-badge {
        font-size: 9px;
        padding: 2px 6px 2px 5px;
        gap: 4px;
    }
    .pncb-icon {
        width: 10px;
        height: 10px;
    }
}

/* ── Accessibility: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    .pncb-badge { transition: none; }
}
