/*
Theme Name: PJ-ONE
Theme URI: https://github.com/automattic/mcp-wordpress-remote
Author: PJ-ONE
Author URI: https://petrajaya.net
Description: PJ-ONE FSE Block Theme - High Density Design System layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pj-one
Tags: one-column, two-columns, three-columns, left-sidebar, right-sidebar, full-site-editing, block-theme

PJ-ONE Layout System & Utility Classes
*/

/* Reset & Global Base styling */
html,
body {
    margin: 0;
    padding: 0;
    height: 100% !important;
}

body:not(.editor-styles-wrapper) {
    overflow: hidden !important;
}

html body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Typography Hierarchy */
html body,
html body input,
html body textarea,
html body select,
html body button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #0f172a !important;
}

html body h1 {
    font-weight: 900 !important;
    letter-spacing: -0.025em !important;
}

html body h2 {
    font-weight: 800 !important;
    letter-spacing: -0.015em !important;
}

html body h3 {
    font-weight: 700 !important;
}

html body p,
html body span,
html body li {
    color: #64748b !important;
}

/* Layout Grid & Matrix Containers */
.pj-global-frame {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-color: #f8fafc;
}

.pj-main-grid {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Left Sidebar: Persistent Command Panel */
html body .pj-sidebar-left {
    display: flex !important;
    flex-direction: column !important;
    width: 16rem !important;
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
}

/* Right Sidebar: Contextual Widgets */
html body .pj-sidebar-right {
    display: flex !important;
    flex-direction: column !important;
    width: 16rem !important;
    background-color: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    margin-right: 0 !important;
}

/* Strip FSE template wrappers from layout on mobile so they don't take up space in the grid */
@media (max-width: 1023.98px) {
    html body .pj-global-frame .wp-block-template-part {
        display: contents !important;
    }
}

/* Main Canvas Content Wrapper */
html body .pj-main-canvas {
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 0 !important;
    background-color: #f8fafc !important;
    overflow-y: auto !important;
    position: relative !important;
    height: 100% !important;
    padding-bottom: 4rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* WordPress Block Constraints Override */
.pj-global-frame,
.pj-main-grid {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

html body .pj-global-frame,
html body .pj-global-frame>* {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.pj-main-grid>.wp-block-group__inner-container {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pj-global-frame>.wp-block-group__inner-container {
    display: flex !important;
    flex-direction: column !important;
    /* Stack main grid and bottom bar vertically */
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pj-sidebar-left>.wp-block-group__inner-container,
.pj-sidebar-right>.wp-block-group__inner-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Force left sidebar and its direct containers to stack vertically */
.pj-sidebar-left,
.pj-sidebar-left>div,
.pj-sidebar-left>.wp-block-group__inner-container {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

/* Prevent sidebar child groups from shrinking, ensuring full natural layout heights and correct scrolling */
.pj-sidebar-left>*,
.pj-sidebar-left>div>*,
.pj-sidebar-left>.wp-block-group__inner-container>*,
.pj-sidebar-right>*,
.pj-sidebar-right>div>*,
.pj-sidebar-right>.wp-block-group__inner-container>* {
    flex-shrink: 0 !important;
}

/* Remove default WordPress margins/block-gaps inside the left and right sidebars */
.pj-sidebar-left *,
.pj-sidebar-left .wp-block-group,
.pj-sidebar-left .wp-block-navigation,
.pj-sidebar-left .wp-block-categories,
.pj-sidebar-left ul,
.pj-sidebar-left li,
.pj-sidebar-left p,
.pj-sidebar-right *,
.pj-sidebar-right .wp-block-group,
.pj-sidebar-right .wp-block-navigation,
.pj-sidebar-right .wp-block-categories,
.pj-sidebar-right ul,
.pj-sidebar-right li,
.pj-sidebar-right p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

/* Set precise, clean professional spacing */
.pj-sidebar-left .pj-nav-group-header {
    margin-top: 1rem !important;
    /* Spacing above each group heading */
    padding: 0.5rem 1.25rem 0.25rem !important;
}

.pj-sidebar-left .wp-block-navigation-item,
.pj-sidebar-left .wp-block-categories li {
    margin-top: 2px !important;
    /* Tight spacing between list items */
}

/* Sticky Header */
.pj-sticky-header {
    height: 4rem;
    /* h-16 */
    border-bottom: none !important;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Constrained Center Wrapper */
.pj-canvas-content {
    flex: 1 1 0%;
    padding: clamp(1rem, 2.5vw, 1.5rem) !important;
    width: 100%;
    box-sizing: border-box;
}

.pj-content-inner {
    max-width: 48rem;
    /* max-w-3xl */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Mobile Smart Bottom Bar */
.pj-mobile-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(4rem + env(safe-area-inset-bottom)) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    background-color: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    align-items: center !important;
    justify-content: space-around !important;
    z-index: 99999 !important;
    /* Keep it above all other elements */
    box-shadow: 0 -10px 15px -3px rgba(0, 0, 0, 0.1), 0 -4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

@media (min-width: 768px) {
    .pj-mobile-bottom-bar {
        display: none !important;
    }
}


/* Sidebar Styling Overrides for Native Blocks */

/* Native Navigation in Sidebars */
.pj-sidebar-left .wp-block-navigation {
    width: 100% !important;
}

.pj-sidebar-left .wp-block-navigation__container,
.pj-sidebar-left .wp-block-navigation-link {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 0 !important;
    /* Forcefully remove the FSE block layout gap between items */
}

.pj-sidebar-left .wp-block-navigation-item {
    width: 100% !important;
    display: block !important;
}

/* Sidebar Navigation Submenu Overrides */
.pj-sidebar-left .wp-block-navigation-item.has-child {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
}

.pj-sidebar-left .wp-block-navigation-item.has-child .wp-block-navigation-item__content {
    flex-grow: 1 !important;
    width: auto !important;
}

.pj-sidebar-left .wp-block-navigation-submenu-container__trigger,
.pj-sidebar-left .wp-block-navigation-submenu-container__button,
.pj-sidebar-left .wp-block-navigation-item.has-child>button {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: auto !important;
    margin-right: 1.5rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    width: auto !important;
    height: 2.25rem !important;
}

.pj-sidebar-left .wp-block-navigation-submenu-container__trigger svg,
.pj-sidebar-left .wp-block-navigation-submenu-container__button svg,
.pj-sidebar-left .wp-block-navigation-item.has-child>button svg {
    width: 12px !important;
    height: 12px !important;
}

.pj-sidebar-left .wp-block-navigation-submenu-container__trigger:hover,
.pj-sidebar-left .wp-block-navigation-submenu-container__button:hover,
.pj-sidebar-left .wp-block-navigation-item.has-child>button:hover {
    color: #0f172a !important;
}

.pj-sidebar-left .wp-block-navigation__submenu-container {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    width: 100% !important;
}

.pj-sidebar-left .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    padding-left: 1.5rem !important;
    margin-left: 1.25rem !important;
}

.pj-sidebar-left .wp-block-navigation-item__content {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 2.25rem !important;
    padding: 0 0.75rem !important;
    margin: 2px 0.75rem !important;
    color: #64748b !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    width: auto !important;
    text-align: left !important;
    border-radius: 8px !important;
}

.pj-sidebar-left .wp-block-navigation-item__content * {
    color: inherit !important;
}

.pj-sidebar-left .wp-block-navigation-item__content:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.pj-sidebar-left .wp-block-navigation-item__content[target="_blank"]::after {
    content: "\2197" !important;
    font-size: 11px !important;
    margin-left: auto !important;
    color: #94a3b8 !important;
    display: inline-block !important;
    padding-left: 0.5rem !important;
    font-weight: bold !important;
}

.pj-sidebar-left .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content,
.pj-sidebar-left .wp-block-navigation-item.current_page_item .wp-block-navigation-item__content,
.pj-sidebar-left .wp-block-categories li.current-cat {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-left: none !important;
}

.pj-sidebar-left .wp-block-categories li.current-cat span {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.pj-nav-group-header {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.10em !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    padding: 1.5rem 1.25rem 0.5rem !important;
    margin: 0 !important;
}

.pj-sidebar-left .wp-block-categories {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.pj-sidebar-left .wp-block-categories li {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 2.25rem !important;
    padding: 0 0.75rem !important;
    margin: 2px 0.75rem !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
}

.pj-sidebar-left .wp-block-categories li:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.pj-sidebar-left .wp-block-categories li a {
    color: inherit !important;
    text-decoration: none !important;
    flex-grow: 1 !important;
}

.pj-sidebar-left .wp-block-categories li span {
    font-size: 10px !important;
    font-weight: 700 !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    padding: 1px 6px !important;
    border-radius: 9999px !important;
    transition: all 0.2s !important;
}

.pj-sidebar-left .wp-block-categories li:hover span {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

.pj-sidebar-user-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pj-sidebar-widget {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.pj-sidebar-widget-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Featured Event/Meetup Card */
.pj-featured-event-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pj-featured-event-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #4f46e5;
    background-color: #eef2ff;
    padding: 2px 6px;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Latest Posts list */
.pj-sidebar-right .wp-block-latest-posts {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.pj-sidebar-right .wp-block-latest-posts li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.pj-sidebar-right .wp-block-latest-posts li:last-child {
    border-bottom: none;
}

.pj-sidebar-right .wp-block-latest-posts a {
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.pj-sidebar-right .wp-block-latest-posts a:hover {
    color: #4f46e5;
}

/* Activity Feed Card Component */
.pj-activity-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    /* rounded-xl */
    padding: 1.25rem;
    /* p-5 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
}

.pj-activity-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.pj-activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.pj-activity-card-title {
    font-size: 1.125rem;
    /* H3 */
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.pj-activity-card-body {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.5;
}

.pj-activity-reactions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 0.875rem;
}

/* Comment Section Premium UI Design Overrides */

/* Comments Card Container */
.pj-comment-container {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin-top: 2rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
}

/* Comment template & list wrapper */
.wp-block-comments {
    width: 100% !important;
}

.wp-block-comments-title {
    display: inline-flex !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    padding: 6px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin-bottom: 1.5rem !important;
    gap: 8px !important;
}

.wp-block-comments-title::before {
    content: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%230f172a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>');
    display: inline-block !important;
    position: relative !important;
    top: 2px !important;
}

/* Form respond wrapper */
.comment-respond {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 1.25rem 1.5rem !important;
    margin-top: 2rem !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
}

#commentform {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
    flex-wrap: wrap !important; /* To handle non-logged in fields if they appear */
}

#reply-title,
.logged-in-as,
.comment-form-comment label,
.comment-notes {
    display: none !important;
}

.comment-form-comment {
    flex: 1 1 auto !important;
    min-width: 0 !important; /* Fix flex overflow */
    margin: 0 !important;
}

/* Custom Textarea Styling */
.comment-form-comment textarea,
#comment {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    line-height: 24px !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    font-family: inherit !important;
    resize: none !important;
    overflow: hidden !important;
}

.comment-form-comment textarea:focus,
#comment:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Submit Button Custom Styling */
.form-submit {
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.form-submit input[type="submit"],
#submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--pj-btn-bg, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 0 1.5rem !important;
    height: 48px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s, transform 0.1s !important;
    margin: 0 !important;
}

.form-submit input[type="submit"]:hover,
#submit:hover {
    background-color: var(--pj-btn-hover, #1d4ed8) !important;
}

.form-submit input[type="submit"]:active,
#submit:active {
    transform: scale(0.98) !important;
}

/* Reply Link Styling */
.wp-block-comment-reply-link {
    display: inline-flex !important;
    align-items: center !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    margin-top: 0.5rem !important;
    transition: color 0.2s !important;
}

.wp-block-comment-reply-link:hover {
    color: #2563eb !important;
}

.wp-block-comment-reply-link::before {
    content: url('data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5v.5"/></svg>');
    display: block !important;
    margin-right: 6px !important;
    position: relative !important;
    top: 1px !important;
}

/* Make sure child comments show indent correctly */
.wp-block-comments .children,
.comment-list .children {
    padding-left: 2rem !important;
    margin-top: 1rem !important;
    border-left: 2px solid #e2e8f0 !important;
    margin-left: 1rem !important;
}

/* List of comments rendering styles */
.comment-list,
.wp-block-comment-template {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.comment-body,
.wp-block-comment,
.pj-comment-item-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1.25rem 1.5rem !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
}

/* Flex profile details inside comment template */
.comment-meta,
.pj-comment-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    width: 100% !important;
}

.comment-avatar img,
.avatar {
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.comment-author cite,
.wp-block-comment-author-name {
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #0f172a !important; /* Dark slate */
    font-style: normal !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Author Badge */
.bypostauthor .wp-block-comment-author-name::after,
li.bypostauthor .comment-author cite::after {
    content: 'AUTHOR';
    background: #d1fae5 !important;
    color: #059669 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    margin-left: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.comment-metadata,
.wp-block-comment-date {
    font-size: 13px !important;
    color: #94a3b8 !important; /* Lighter gray/blue */
    font-style: normal !important;
    text-align: right !important;
    margin-left: auto !important;
}

html body .pj-comment-header .wp-block-comment-date,
html body .pj-comment-item-card .wp-block-comment-date {
    flex: 1 1 auto !important;
    text-align: right !important;
    margin-left: auto !important;
    display: block !important;
}

.comment-content p,
.wp-block-comment-content p,
.wp-block-comment-content {
    font-size: 15px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding-left: 0 !important;
    text-align: left !important;
}

/* UI Callout & Accent Styling Rules */
.pj-accent-primary {
    color: #4f46e5;
    background-color: #eef2ff;
    border: 1px solid rgba(199, 210, 254, 0.6);
}

.pj-accent-success {
    color: #065f46;
    background-color: #ecfdf5;
    border: 1px solid rgba(167, 243, 208, 0.6);
}

.pj-accent-critical {
    color: #9f1239;
    background-color: #fff1f2;
    border: 1px solid rgba(254, 205, 211, 0.6);
}

.pj-accent-warning {
    color: #92400e;
    background-color: #fffbeb;
    border: 1px solid rgba(253, 230, 138, 0.6);
}

/* Date block custom card styling */
.pj-date-widget-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Responsive Styles for Matrix Grid Layout & Off-Canvas Mobile Left & Right Sidebar Drawers */
@media (max-width: 1023.98px) {
    html body .pj-sidebar-left {
        display: flex !important;
        position: fixed !important;
        top: 33px !important;
        /* Start below the mobile topbar */
        left: 0 !important;
        width: 280px !important;
        height: calc(100vh - 33px) !important;
        /* Full height minus topbar */
        z-index: 1000000 !important;
        transform: translateX(-100%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease !important;
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.15) !important;
        background-color: #ffffff !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }

    /* Active left drawer state */
    html body.pj-sidebar-open .pj-sidebar-left {
        transform: translateX(0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Off-canvas right sidebar drawer styles */
    html body .pj-sidebar-right {
        display: flex !important;
        position: fixed !important;
        top: 33px !important;
        /* Start below the mobile topbar */
        right: 0 !important;
        width: 280px !important;
        height: calc(100vh - 33px) !important;
        /* Full height minus topbar */
        z-index: 1000000 !important;
        transform: translateX(100%) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease !important;
        box-shadow: -10px 0 30px rgba(15, 23, 42, 0.15) !important;
        background-color: #ffffff !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
        /* Remove desktop margin-right that causes side gaps */
        margin-right: 0 !important;
    }

    /* Ensure main feed container has a healthy minimum width and expands to fill layout space */
    html body main {
        flex-shrink: 1 !important;
        flex-grow: 1 !important;
        min-width: 280px !important;
    }

    /* Active right drawer state */
    html body.pj-sidebar-right-open .pj-sidebar-right {
        transform: translateX(0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }



    /* Backdrop overlay style */
    .pj-sidebar-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background-color: rgba(15, 23, 42, 0.3) !important;
        /* Muted color */
        backdrop-filter: blur(8px) !important;
        /* Premium blur */
        -webkit-backdrop-filter: blur(8px) !important;
        z-index: 999999 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    html body.pj-sidebar-open .pj-sidebar-backdrop,
    html body.pj-sidebar-right-open .pj-sidebar-backdrop {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Close button inside mobile sidebars */
    .pj-sidebar-close-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background-color: var(--fcom-active-bg, #f1f5f9) !important;
        color: var(--fcom-primary-text, #0f172a) !important;
        border: none !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        z-index: 20 !important;
    }

    /* Right hamburger in topbar replaces the old floating FAB; FAB styles removed */


    .pj-main-canvas {
        padding-bottom: 5rem;
        /* space for bottom bar */
    }

    /* Push the global layout below the new fixed mobile topbar */
    html body .pj-global-frame {
        padding-top: 56px !important;
    }

    /* Reduce top padding/margin of main canvas content area on mobile to eliminate gap */
    html body .pj-main-canvas,
    html body main,
    html body .pj-main-canvas>.wp-block-group,
    html body main>.wp-block-group {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
    }

    /* Remove the 24px Gutenberg flow block gap specifically between the header and main content/first block on mobile */
    html body main.is-layout-flow> :first-child,
    html body .pj-main-canvas.is-layout-flow> :first-child,
    html body .pj-main-canvas :where(.is-layout-flow)> :first-child,
    html body main :where(.is-layout-flow)> :first-child {
        margin-block-start: 0 !important;
        margin-top: 0 !important;
    }

    /* Remove Gutenberg block-gap margins between header and content container on mobile only */
    html body .pj-global-frame>*,
    html body div.wp-block-group.flex.flex-row.h-full.w-full {
        margin-block-start: 0 !important;
        margin-block-end: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* ── Right sidebar widget full-width stretch on mobile ── */
    html body .pj-sidebar-right {
        background-color: #ffffff !important;
    }

    /* Make all direct widget children stretch full width, matching left sidebar behaviour */
    html body .pj-sidebar-right .pj-user-card,
    html body .pj-sidebar-right .pj-trending-posts-widget,
    html body .pj-sidebar-right .pj-recent-activities-widget,
    html body .pj-sidebar-right .pj-sidebar-widget {
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin: 0 !important;
    }

    /* Normalize the inline-styled user card to fill full width */
    html body .pj-sidebar-right .pj-user-card {
        border-top: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        padding: 1rem 1.25rem !important;
    }

    /* Match section headings to left sidebar style */
    html body .pj-sidebar-right .wp-block-group > p.text-\[10\.5px\] {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* User Card link hovers */
.pj-user-card-link:hover {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.pj-user-card-link-cta:hover {
    color: #4f46e5 !important;
    text-decoration: underline !important;
}

/* Trending Posts and Recent Activities widget adjustments */
.pj-trending-posts-widget p,
.pj-recent-activities-widget p {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Adjust outer height when WP Admin Bar is present to prevent layout clipping */
.admin-bar .h-screen {
    height: calc(100vh - 32px) !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .h-screen {
        height: calc(100vh - 46px) !important;
    }
}

/* Enforce border-radius on post featured images */
.wp-block-post-featured-image img {
    border-radius: 12px !important;
    object-fit: cover !important;
}

/* Card backgrounds & borders */
html body .pj-main-canvas .wp-block-group.bg-white,
html body .pj-main-canvas article.wp-block-group,
html body .pj-main-canvas .pj-comment-container,
html body .pj-main-canvas .comment-respond,
html body .pj-date-widget-card,
html body .pj-sidebar-right .pj-sidebar-widget {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    border-radius: 12px !important;
}

/* Color utilities text/border */
html body .text-slate-900,
html body .text-slate-800,
html body .hover\:text-slate-900:hover,
html body .hover\:text-slate-800:hover {
    color: #0f172a !important;
}

html body .text-slate-600,
html body .text-slate-500,
html body .text-slate-400,
html body .hover\:text-slate-600:hover,
html body .hover\:text-slate-500:hover {
    color: #64748b !important;
}

html body .border-slate-200,
html body .border-slate-100 {
    border-color: #e2e8f0 !important;
}

/* Fluent-like Notifications Dropdown Menu */
html body .fcom_notification_holder {
    position: relative !important;
}

.pj-notification-dropdown {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: -10px !important;
    width: 520px !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    z-index: 99999 !important;
    font-family: 'Inter', sans-serif !important;
    overflow: visible !important;
    /* Allow popover arrow to display */
    padding: 0 !important;
}

/* Popover Top Arrow pointing to the bell icon */
.pj-notification-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 24px;
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    transform: rotate(45deg);
    z-index: 100000;
}

.pj-notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background-color: #ffffff !important;
}

.pj-notification-dropdown-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.pj-mark-all-read-btn {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    cursor: pointer !important;
    padding: 6px 12px !important;
    transition: all 0.2s !important;
}

.pj-mark-all-read-btn:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
}

.pj-notification-dropdown-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 0 20px !important;
    gap: 20px !important;
    background-color: #ffffff !important;
}

.pj-tab-btn {
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 12px 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.pj-tab-btn.active {
    border-bottom-color: #2563eb !important;
    color: #2563eb !important;
    font-weight: 600 !important;
}

.pj-notification-dropdown-content {
    max-height: 320px;
    overflow-y: auto;
    background-color: #ffffff !important;
}

.pj-notification-item {
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background-color 0.2s;
}

.pj-notification-item:hover {
    background-color: #f1f5f9 !important;
}

.pj-notification-item.unread {
    background-color: #fffce3 !important;
}

.pj-notification-item-link {
    display: flex;
    align-items: center;
    padding: 12px 20px !important;
    text-decoration: none !important;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.pj-notification-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    overflow: hidden;
    flex-shrink: 0;
}

.pj-notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pj-notification-body {
    flex-grow: 1;
    min-width: 0;
}

.pj-notification-title {
    margin: 0 !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: #0f172a !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pj-notification-time {
    font-size: 11px;
    color: #94a3b8 !important;
    margin-top: 4px;
    display: block;
}

.pj-unread-dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 9999px;
    flex-shrink: 0;
}

.pj-no-notifications {
    padding: 40px 20px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #6b7280 !important;
}

.pj-loader {
    padding: 40px 20px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #6b7280 !important;
}

.pj-notification-dropdown-footer {
    padding: 16px 20px !important;
    border-top: 1px solid #e5e7eb !important;
    text-align: left !important;
    background-color: #ffffff !important;
}

.pj-view-all-btn {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 8px 18px !important;
    transition: all 0.2s !important;
}

.pj-view-all-btn:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    text-decoration: none !important;
}

/* User Avatar Dropdown Overrides */
.fcom_profile_menu {
    position: relative;
    cursor: pointer;
}

/* Position the sub menu absolute relative to the trigger menu */
html body .fcom_menu_item_user {
    position: relative !important;
}

html body .fcom_profile_sub_menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: -10px !important;
    width: 240px !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    z-index: 99999 !important;
    padding: 8px 0 !important;
    list-style: none !important;
    margin: 0 !important;
}

/* Top popover arrow pointing to the avatar icon */
html body .fcom_profile_sub_menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 24px;
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    transform: rotate(45deg);
    z-index: 100000;
}

html body .fcom_profile_menu.active .fcom_profile_sub_menu {
    display: block !important;
}

html body .fcom_profile_sub_menu li.fcom_profile_block {
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
}

html body .fcom_profile_sub_menu li.fcom_profile_block a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 12px 16px !important;
    gap: 12px !important;
    text-decoration: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

html body .fcom_profile_avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

html body .fcom_profile_avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

html body .fcom_user_info {
    min-width: 0 !important;
    flex-grow: 1 !important;
    text-align: left !important;
}

html body .fcom_user_name {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
}

html body .fcom_user_email {
    margin: 2px 0 0 0 !important;
    font-size: 11px !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Format other menu items horizontally */
html body .fcom_profile_sub_menu li:not(.fcom_profile_block) a,
html body .fcom_profile_sub_menu li a.fcom_menu_link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    transition: background-color 0.2s !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px !important;
    text-align: left !important;
}

html body .fcom_profile_sub_menu li:not(.fcom_profile_block) a:hover,
html body .fcom_profile_sub_menu li a.fcom_menu_link:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Enforce icon container and SVG icon sizes inside dropdown */
html body .fcom_profile_sub_menu .community_avatar,
html body .fcom_profile_sub_menu li:not(.fcom_profile_block) .community_avatar {
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

html body .fcom_profile_sub_menu .community_avatar svg,
html body .fcom_profile_sub_menu .community_avatar i,
html body .fcom_profile_sub_menu .community_avatar .fcom_shape,
html body .fcom_profile_sub_menu a svg,
html body .fcom_profile_sub_menu li:not(.fcom_profile_block) a svg {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    color: #6b7280 !important;
}

html body .fcom_profile_sub_menu a:hover svg,
html body .fcom_profile_sub_menu a:hover i {
    color: #0f172a !important;
}

/* Reduce gap between post title and excerpt in loop feeds */
html body .wp-block-post-template .wp-block-post-excerpt,
html body .wp-block-post-template p.wp-block-post-excerpt__excerpt {
    margin-block-start: 4px !important;
    margin-top: 4px !important;
}

/* Custom override for post title padding */
html body .wp-block-post-title {
    padding-top: 10px !important;
    padding-bottom: 0 !important;
}

/* Hide left sidebar logo/brand header on desktop viewports but keep it on mobile drawer */
@media (min-width: 1024px) {
    html body .pj-sidebar-left>.wp-block-group:first-child {
        display: none !important;
    }
}

/* Remove underline from author/user name and comment count links */
html body .wp-block-post-author-name a,
html body .wp-block-post-comments-link a,
html body .pj-comment-author-name a,
html body .pj-comment-item-card a {
    text-decoration: none !important;
}

html body .wp-block-post-author-name a:hover,
html body .wp-block-post-comments-link a:hover,
html body .pj-comment-author-name a:hover,
html body .pj-comment-item-card a:hover {
    text-decoration: none !important;
}

/* Stack user block and post date vertically on mobile viewports */
@media (max-width: 767.98px) {
    html body .wp-block-group.bg-white.rounded-xl .wp-block-group.border-b {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    html body .pj-post-date-wrapper {
        text-align: left !important;
        padding-left: 0 !important;
        /* Far left alignment to match post title */
    }
}

/* Post Card Footer Row (Comments Link + Share Buttons) */
html body .wp-block-group.border-t,
html body .pj-card-footer {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
}

html body .wp-block-post-comments-link {
    display: inline-flex !important;
    align-items: center !important;
    margin-right: 0.25rem !important;
}

html body .wp-block-post-comments-link a {
    color: var(--pj-link-color, #6366f1) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    font-size: 13px !important;
}

/* Prevent underlines on hover for user card links */
html body .pj-user-card-link:hover {
    text-decoration: none !important;
    color: #4f46e5 !important;
}

/* ==========================================================================
   Fluid CSS Clamp Styles for Dynamic Responsiveness
   ========================================================================== */

/* Fluid Spacing for Post Cards / Containers */
html body .wp-block-group.bg-white.rounded-xl {
    padding: clamp(1rem, 2.5vw, 1.5rem) !important;
    margin-bottom: clamp(1rem, 2vw, 1.5rem) !important;
}

/* Fluid Typography for Post Titles */
html body h1.wp-block-post-title {
    font-size: clamp(1.5rem, 4.5vw, 2.25rem) !important;
}

html body h3.wp-block-post-title {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem) !important;
}

/* Fluid Spacing and Typography for Right Sidebar Widget Headers */
html body .pj-trending-posts-widget h4,
html body .pj-recent-activities-widget h4,
html body .pj-user-card h4 {
    font-size: clamp(12.5px, 1.8vw, 14px) !important;
}

/* Fluid Spacing and Typography for Left Sidebar Menu Items & Subheaders */
.pj-sidebar-left .wp-block-navigation-item a,
.pj-sidebar-left .wp-block-navigation-item button,
.pj-sidebar-left .wp-block-categories li a,
.pj-sidebar-left .pj-nav-group-header {
    font-size: clamp(12px, 1.5vw, 13px) !important;
}

/* Ensure links and post titles on hover use clean theme accent colors */
html body a:hover,
html body .hover\:text-indigo-600:hover,
html body .wp-block-post-title a:hover {
    color: #4f46e5 !important;
}

/* Ajax Load More Button Styles */
html body #pj-load-more-btn {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    transition: background-color 0.2s, transform 0.2s !important;
}

html body #pj-load-more-btn:hover {
    background-color: #4338ca !important;
}

/* Comment Form Submission Button style override */
html body .comment-respond input[type="submit"],
html body .comment-respond .submit,
html body #commentform #submit {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.65rem 1.5rem !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s, transform 0.2s, filter 0.2s !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.15) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body .comment-respond input[type="submit"]:hover,
html body .comment-respond .submit:hover,
html body #commentform #submit:hover,
html body .hover\:bg-indigo-600:hover,
html body .hover\:bg-indigo-700:hover,
html body .hover\:bg-indigo-800:hover,
html body .hover\:bg-primary-hover:hover {
    background-color: #4338ca !important;
    color: #ffffff !important;
    filter: brightness(1.05) !important;
}

/* Hide WordPress comment form logged in status and required fields notes */
html body .comment-respond .logged-in-as,
html body .comment-respond .comment-notes {
    display: none !important;
}

/* Mobile Bottom Bar Navigation override for PJ-ONE */
.pj-mobile-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    height: 100% !important;
    text-decoration: none !important;
    color: #475569 !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    gap: 4px !important;
}

.pj-mobile-nav-item:hover,
.pj-mobile-nav-item:focus {
    color: #0f172a !important;
}

.pj-mobile-nav-icon {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor !important;
    display: block !important;
    transition: transform 0.2s ease !important;
}

.pj-mobile-nav-item:hover .pj-mobile-nav-icon {
    transform: scale(1.08);
}

.pj-mobile-nav-label {
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: inherit !important;
    display: block !important;
}

/* Comment Reply and Edit Links */
.comment-reply-link,
.comment-edit-link,
.wp-block-comment-reply-link,
.wp-block-comment-edit-link {
    color: #4f46e5 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
}
.wp-block-comment-reply-link,
.wp-block-comment-edit-link {
    margin-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
    font-size: 13px !important;
}
.comment-reply-link:hover,
.comment-edit-link:hover,
.wp-block-comment-reply-link:hover,
.wp-block-comment-edit-link:hover {
    color: #4338ca !important;
    text-decoration: underline !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Top Bar: [☰ Left] [Brand Logo] [☰ Right]
   ═══════════════════════════════════════════════════════════════════════ */

/* Hidden by default; shown only on mobile */
.pj-mobile-topbar {
    display: none;
}

/* Mobile right panel header: shown only when JS clones it */
.pj-mobile-right-panel-header {
    display: none;
}

@media (max-width: 1023.98px) {
    /* ── Topbar layout ── */
    .pj-mobile-topbar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 56px !important;
        z-index: 1000001 !important;
        align-items: center !important;
        justify-content: space-between !important;
        background-color: #ffffff !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 0 0.5rem !important;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08) !important;
    }

    /* Hamburger buttons in topbar */
    .pj-mobile-topbar-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
        background: transparent !important;
        border: none !important;
        color: #64748b !important;
        cursor: pointer !important;
        transition: background-color 0.2s, color 0.2s !important;
        flex-shrink: 0 !important;
    }

    .pj-mobile-topbar-btn:hover {
        background-color: #f1f5f9 !important;
        color: #0f172a !important;
    }

    /* Active state when sidebar is open */
    html body.pj-sidebar-open #pj-topbar-left-toggle {
        background-color: #f1f5f9 !important;
        color: #4f46e5 !important;
    }

    html body.pj-sidebar-right-open #pj-topbar-right-toggle {
        background-color: #f1f5f9 !important;
        color: #4f46e5 !important;
    }

    /* Brand logo / site name centered */
    .pj-mobile-topbar-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        flex: 1 !important;
        overflow: hidden !important;
    }

    .pj-mobile-topbar-logo {
        height: 32px !important;
        width: auto !important;
        max-width: 140px !important;
        object-fit: contain !important;
        display: block !important;
    }

    .pj-mobile-topbar-name {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        letter-spacing: -0.02em !important;
    }
}

/* ── Desktop: always hide mobile-only elements ── */
@media (min-width: 1024px) {
    .pj-mobile-topbar,
    .pj-sidebar-close-btn {
        display: none !important;
    }
    /* Remove topbar padding-top on desktop */
    html body .pj-global-frame {
        padding-top: 0 !important;
    }
}

/* Hide the entire FluentCommunity header bar on mobile (replaced by pj-mobile-topbar) */
@media (max-width: 1023.98px) {
    html body .fcom_top_menu {
        display: none !important;
    }
}

@media (max-width: 782px) {
    .admin-bar .pj-mobile-topbar {
        top: 46px !important;
    }
    .admin-bar .pj-sidebar-left,
    .admin-bar .pj-sidebar-right {
        top: calc(33px + 46px) !important;
        height: calc(100vh - 33px - 46px) !important;
    }
}

@media (min-width: 783px) and (max-width: 1023.98px) {
    .admin-bar .pj-mobile-topbar {
        top: 32px !important;
    }
    .admin-bar .pj-sidebar-left,
    .admin-bar .pj-sidebar-right {
        top: calc(33px + 32px) !important;
        height: calc(100vh - 33px - 32px) !important;
    }
}

/* Center main feed container without sidebars */
html body .pj-main-canvas {
    align-items: center !important;
}
html body .pj-main-canvas > .wp-block-group {
    max-width: 56rem !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Post Feed Card - 98% width on mobile viewports */
@media (max-width: 767.98px) {
    html body .pj-main-canvas > .wp-block-group {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    html body .pj-main-canvas .wp-block-query {
        width: 100% !important;
    }
    
    html body .pj-main-canvas .wp-block-post-template > li,
    html body .pj-main-canvas .wp-block-post-template > article,
    html body .pj-main-canvas .wp-block-post-template > .wp-block-group,
    html body .pj-main-canvas .wp-block-post-template > li > .wp-block-group {
        width: 98% !important;
        max-width: 98% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }
}

/* Post Share Links & Social Icons Fallback Rules */
html body .pj-share-links {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
}

html body .pj-share-links a,
html body .pj-share-links button.pj-copy-link-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 9999px !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

html body .pj-share-links a svg,
html body .pj-share-links button.pj-copy-link-btn svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0 !important;
    display: block !important;
}

html body .pj-share-links a[aria-label*="WhatsApp"]:hover { background-color: #25D366 !important; color: #ffffff !important; }
html body .pj-share-links a[aria-label*="Facebook"]:hover { background-color: #1877F2 !important; color: #ffffff !important; }
html body .pj-share-links a[aria-label*="X"]:hover { background-color: #000000 !important; color: #ffffff !important; }
html body .pj-share-links a[aria-label*="LinkedIn"]:hover { background-color: #0A66C2 !important; color: #ffffff !important; }
html body .pj-share-links button.pj-copy-link-btn:hover { background-color: #e2e8f0 !important; color: #0f172a !important; }