/* Hide scrollbars completely while retaining scrollability (Frontend only) */
html body .pj-sidebar-left,
html body .pj-sidebar-right,
html body .pj-main-canvas,
html body main {
    scrollbar-width: none !important;
    /* Firefox */
    -ms-overflow-style: none !important;
    /* IE/Legacy Edge */
    scroll-behavior: smooth !important;
}

html body .pj-sidebar-left::-webkit-scrollbar,
html body .pj-sidebar-right::-webkit-scrollbar,
html body .pj-main-canvas::-webkit-scrollbar,
html body main::-webkit-scrollbar {
    display: none !important;
    /* Chrome, Safari, Edge */
}

/* Floating Controls Panel (Back to Top, Back to Feed, Next/Prev Articles) */
.pj-floating-controls {
    position: fixed !important;
    bottom: 5.5rem !important;
    left: calc(50% + 24.5rem) !important;
    right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    z-index: 9999 !important;
}

.pj-floating-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background-color: var(--fcom-primary-bg, #ffffff) !important;
    border: 1px solid var(--fcom-primary-border, #e2e8f0) !important;
    color: var(--fcom-secondary-text, #64748b) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: opacity 0.3s, transform 0.3s, background-color 0.2s, color 0.2s !important;
    text-decoration: none !important;
}

#pj-back-to-top {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
}

#pj-back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.pj-floating-btn:hover {
    background-color: var(--fcom-primary-button, #4f46e5) !important;
    color: var(--fcom-primary-button-text, #ffffff) !important;
    border-color: var(--fcom-primary-button) !important;
}

/* Responsive adjustment for narrower screens/mobile viewports */
@media (max-width: 1280px) {
    .pj-floating-controls {
        right: 1.5rem !important;
        left: auto !important;
        bottom: 5.5rem !important;
    }
}

/* Post Categories - Individual Pill styling & tight spacing overrides */
.pj-post-categories {
    display: flex !important;
    flex-wrap: wrap !important;
    row-gap: 4px !important;
    column-gap: 0.1px !important;
    /* Reduced horizontal gap between pills */
    margin-top: 8px !important;
    /* Proper margin after excerpt/content */
    margin-bottom: 12px !important;
    /* Spacing above footer/share divider */
    padding: 0 !important;
}

.pj-post-categories a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    height: 18px !important;
    /* Fixed height for exact vertical centering */
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--fcom-primary-button, #4f46e5) !important;
    background-color: var(--fcom-secondary-button-bg, #f5f3ff) !important;
    padding: 0 8px !important;
    /* Horizontal padding only */
    border-radius: 9999px !important;
    text-decoration: none !important;
    transition: background-color 0.2s, color 0.2s !important;
}

.pj-post-categories a:hover {
    background-color: var(--fcom-primary-button, #4f46e5) !important;
    color: var(--fcom-primary-button-text, #ffffff) !important;
}