body.mpcirc-circle-page {
    background-color: #FFF;
}

body.mpcirc-circle-page .site-header {
    max-width: none;
}

body.mpcirc-circle-page .entry-site-main {
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
}

/* ===== POST ACTIONS AJAX LOADING ===== */
body.mpcirc-circle-page .mpcirc-latest-post-action-dots.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-dots.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: mpcirc-spin 1s linear infinite;
}

/* Loading container in dropdown */
body.mpcirc-circle-page .mpcirc-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

body.mpcirc-circle-page .mpcirc-loading-container .mpcirc-spin {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8ee;
    border-top: 3px solid #1da69a;
    border-radius: 50%;
    animation: mpcirc-spin 1s linear infinite;
    margin-bottom: 10px;
}

body.mpcirc-circle-page .mpcirc-loading-container p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Error container in dropdown */
body.mpcirc-circle-page .mpcirc-error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

body.mpcirc-circle-page .mpcirc-error-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

body.mpcirc-circle-page .mpcirc-error-message {
    margin: 0 0 15px 0;
    color: #d32f2f;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-retry-btn,
body.mpcirc-circle-page .mpcirc-close-error-btn {
    margin: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-retry-btn {
    background-color: #1976d2;
    color: white;
}

body.mpcirc-circle-page .mpcirc-retry-btn:hover {
    background-color: #1565c0;
}

body.mpcirc-circle-page .mpcirc-close-error-btn {
    background-color: #f5f5f5;
    color: #333;
}

body.mpcirc-circle-page .mpcirc-close-error-btn:hover {
    background-color: #e0e0e0;
}

@keyframes mpcirc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== THEME COMPATIBILITY ===== */
/* Override theme width constraints to preserve MemberPress ClubCircles layout */
body.mpcirc-circle-page #primary,
body.mpcirc-circle-page .site-main,
body.mpcirc-circle-page .entry-content,
body.mpcirc-circle-page .content-area,
body.mpcirc-circle-page .container,
body.mpcirc-circle-page .main-content {
    max-width: none !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure the MemberPress site wrapper maintains full width */
body.mpcirc-circle-page #mpcirc-site-wrapper {
    width: 100% !important;
    max-width: none !important;
}

/* Override theme button styles for all MemberPress buttons */
body.mpcirc-circle-page button,
body.mpcirc-circle-page input[type="button"],
body.mpcirc-circle-page input[type="submit"],
body.mpcirc-circle-page .mpcirc-explore-all-button,
body.mpcirc-circle-page .mpcirc-join-circle-btn,
body.mpcirc-circle-page button[class*="mpcirc-"],
body.mpcirc-circle-page input[type="button"][class*="mpcirc-"],
body.mpcirc-circle-page input[type="submit"][class*="mpcirc-"],
body.mpcirc-circle-page a[class*="mpcirc-"][class*="btn"],
body.mpcirc-circle-page a[class*="mpcirc-"][class*="button"] {
    text-transform: none !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
}

/* Override theme input and select styles for MemberPress forms */
body.mpcirc-circle-page input,
body.mpcirc-circle-page textarea,
body.mpcirc-circle-page select,
body.mpcirc-circle-page input[class*="mpcirc-"],
body.mpcirc-circle-page textarea[class*="mpcirc-"],
body.mpcirc-circle-page select[class*="mpcirc-"] {
    box-sizing: border-box !important;
    font-family: inherit !important;
}

/* ===== MODERN EMOJI PICKER STYLES ===== */
body.mpcirc-circle-page .mpcirc-modern-emoji-picker {
    --emoji-picker-border-radius: 8px;
    --emoji-picker-border: 1px solid #ccc;
    --emoji-picker-background: #ffffff;
    --emoji-picker-backdrop-color: rgba(0, 0, 0, 0.6);
    --emoji-picker-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Light theme colors */
    --background: #ffffff;
    --border-color: #e0e0e0;
    --indicator-color: #385898;
    --input-border-color: #ccc;
    --input-font-color: #333;
    --input-font-size: 1rem;
    --input-line-height: 1.5;
    --input-padding: 0.5rem;
    --button-active-background: #e6f3ff;
    --button-hover-background: #f5f5f5;
    --skintone-border-radius: 1rem;
    --category-font-color: #111;
    --category-font-size: 1rem;
}

/* Ensure emoji picker can receive focus */
body.mpcirc-circle-page .mpcirc-modern-emoji-picker:focus {
    outline: 2px solid #385898;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-modern-emoji-picker:focus-visible {
    outline: 2px solid #385898;
    outline-offset: 2px;
}

/* Customize scrollbars for emoji picker */
body.mpcirc-circle-page .mpcirc-modern-emoji-picker ::-webkit-scrollbar {
    width: 8px;
    height: 0px; /* Hide horizontal scrollbar */
}

body.mpcirc-circle-page .mpcirc-modern-emoji-picker ::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 4px;
}

body.mpcirc-circle-page .mpcirc-modern-emoji-picker ::-webkit-scrollbar-thumb {
    background-color: #d0d0d0;
    border-radius: 4px;
    border: 1px solid #ffffff;
}

body.mpcirc-circle-page .mpcirc-modern-emoji-picker ::-webkit-scrollbar-thumb:hover {
    background-color: #b8b8b8;
}

/* For Firefox */
body.mpcirc-circle-page .mpcirc-modern-emoji-picker * {
    scrollbar-width: thin;
    scrollbar-color: #cecece #ffffff !important;
}

/* Hide horizontal overflow */
body.mpcirc-circle-page .mpcirc-modern-emoji-picker {
    overflow-x: hidden;
}

/* Note: Emoji picker responsive styles moved to main responsive sections below */

/* Common focus removal */
body.mpcirc-circle-page a:focus,
body.mpcirc-circle-page button:focus,
body.mpcirc-circle-page input:focus,
body.mpcirc-circle-page textarea:focus,
body.mpcirc-circle-page select:focus {
    outline: none;
}

/* Common focus-visible styles */
body.mpcirc-circle-page a:focus-visible,
body.mpcirc-circle-page input:focus-visible,
body.mpcirc-circle-page textarea:focus-visible,
body.mpcirc-circle-page select:focus-visible {
    outline: none;
    border: 1px solid #06429e;
}

body.mpcirc-circle-page button:focus-visible {
    outline: 1px solid #06429e;
    outline-offset: 2px;
}

/* ===== ACCESSIBILITY ===== */
/* Skip Link for keyboard navigation */
body.mpcirc-circle-page .mpcirc-skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 1000;
    padding: 8px;
    background: #000;
    border-radius: 0 0 4px 4px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: top 0.3s;
}

body.mpcirc-circle-page .mpcirc-skip-link:focus-visible {
    top: 0;
}

/* Visually hidden content for screen readers */
body.mpcirc-circle-page .mpcirc-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Focus override for specific inputs */
body.mpcirc-circle-page input.mpcirc-comment-form-input:focus-visible,
body.mpcirc-circle-page input.mpcirc-post-form-input:focus-visible,
body.mpcirc-circle-page textarea.mpcirc-post-form-input:focus-visible {
    border: none;
}

/* ===== HEADER STYLES ===== */
body.mpcirc-circle-page #mpcirc-masthead {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 10px 5px 5px 10px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.mpcirc-circle-page #mpcirc-masthead-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
}

/* Logo styles */
body.mpcirc-circle-page #mpcirc-logo {
    flex-shrink: 0;
}

body.mpcirc-circle-page #mpcirc-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #0f141a;
    font-size: 20px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

body.mpcirc-circle-page #mpcirc-logo a:hover {
    opacity: 0.8;
}

body.mpcirc-circle-page #mpcirc-logo img {
    max-height: 80px;
    width: auto;
}

body.mpcirc-circle-page #mpcirc-logo span {
    color: #0f141a;
    font-size: 20px;
    font-weight: 600;
}

/* Navigation Container - positioned like user dropdown */
body.mpcirc-circle-page .mpcirc-nav-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Hamburger Menu Button */
body.mpcirc-circle-page .mpcirc-mobile-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    overflow: visible;
}

body.mpcirc-circle-page .mpcirc-mobile-menu:hover {
    opacity: 0.7;
}

body.mpcirc-circle-page .mpcirc-mobile-menu:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Override theme button styles for hamburger menu */
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-mobile-menu,
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-mobile-menu:hover,
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-mobile-menu:focus,
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-mobile-menu:active {
    background-color: transparent !important;
    color: #374151 !important;
    border: none !important;
}

/* Ensure hamburger lines maintain their color */
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-mobile-menu .mpcirc-mobile-menu-line {
    background-color: #374151 !important;
}

body.mpcirc-circle-page .mpcirc-mobile-menu-line {
    width: 24px;
    height: 2px;
    background-color: #374151;
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
    border-radius: 1px;
}

/* Hamburger to X animation */
body.mpcirc-circle-page .mpcirc-mobile-menu[aria-expanded="true"] .mpcirc-mobile-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

body.mpcirc-circle-page .mpcirc-mobile-menu[aria-expanded="true"] .mpcirc-mobile-menu-line:nth-child(2) {
    opacity: 0;
}

body.mpcirc-circle-page .mpcirc-mobile-menu[aria-expanded="true"] .mpcirc-mobile-menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Menu */
body.mpcirc-circle-page .mpcirc-main-nav {
    position: absolute;
    top: 100%;
    right: 0; /* Align with the container edge like user dropdown */
    z-index: 50;
    margin-top: 8px; /* Match user dropdown positioning */
    padding: 8px 0; /* Reduced padding to match user dropdown */
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px); /* Match user dropdown transform */
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-main-nav.nav-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.mpcirc-circle-page .mpcirc-nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.mpcirc-circle-page .mpcirc-nav-list li {
    list-style: none;
    margin: 0;
}

body.mpcirc-circle-page .mpcirc-nav-list a {
    display: block;
    padding: 10px 16px; /* Reduced padding to match user dropdown */
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

body.mpcirc-circle-page .mpcirc-nav-list li:last-child a {
    border-bottom: none;
}

body.mpcirc-circle-page .mpcirc-nav-list a:hover,
body.mpcirc-circle-page .mpcirc-nav-list a:focus {
    background-color: #f9fafb; /* Match user dropdown hover color */
    color: #1da69a;
    outline: none;
}

/* Desktop Navigation - Show links inline on larger screens */
@media (min-width: 769px) {
    body.mpcirc-circle-page .mpcirc-nav-container {
        position: static; /* Reset container positioning for desktop */
        display: inline-flex; /* Prevent container from expanding */
        align-items: center;
    }

    body.mpcirc-circle-page .mpcirc-main-nav {
        position: static;
        margin: 0;
        padding: 0;
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        right: auto; /* Reset right positioning for desktop */
        text-align: right;
        margin-right: 10px;
    }

    body.mpcirc-circle-page .mpcirc-nav-list {
        display: inline-flex; /* Use inline-flex to prevent taking full width */
        flex-direction: row;
        align-items: center;
        gap: 0; /* Remove gap to make it more compact */
    }

    body.mpcirc-circle-page .mpcirc-nav-list a {
        padding: 6px 12px; /* Reduced padding for more compact appearance */
        border: none;
        border-radius: 6px;
    }

    body.mpcirc-circle-page .mpcirc-mobile-menu {
        display: none;
    }

    /* Reduce header gap on desktop for tighter spacing */
    body.mpcirc-circle-page .mpcirc-header-right {
        gap: 4px; /* Even smaller gap on desktop */
    }

}

/* Right side header group (navigation + user dropdown) */
body.mpcirc-circle-page .mpcirc-header-right {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced gap for tighter spacing */
}

/* ===== FOOTER STYLES ===== */
body.mpcirc-circle-page #mpcirc-site-footer {
    padding: 40px 20px;
    background-color: #fff;
    border-top: 1px solid #d9d9d9;
    color: #6c757d;
}

body.mpcirc-circle-page #mpcirc-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
}

body.mpcirc-circle-page .mpcirc-footer-info {
    color: #2c3637;
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    body.mpcirc-circle-page #mpcirc-footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

}

/* User dropdown styles */
body.mpcirc-circle-page .mpcirc-user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-toggle:hover {
    border-color: #e5e7eb;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-toggle:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

/* Override theme button styles for user dropdown */
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-user-dropdown-toggle,
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-user-dropdown-toggle:hover,
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-user-dropdown-toggle:focus,
body.mpcirc-circle-page #mpcirc-masthead .mpcirc-user-dropdown-toggle:active {
    background-color: transparent !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

body.mpcirc-circle-page #mpcirc-masthead .mpcirc-user-dropdown-toggle:hover {
    border-color: #e5e7eb !important;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-toggle[aria-expanded="true"] {
    border-color: #1da69a;
}

body.mpcirc-circle-page .mpcirc-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
}

body.mpcirc-circle-page .mpcirc-user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    margin: 0;
    margin-top: 8px;
    padding: 8px 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-user-dropdown[aria-expanded="true"] .mpcirc-user-dropdown-menu,
body.mpcirc-circle-page .mpcirc-user-dropdown.active .mpcirc-user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.mpcirc-circle-page .mpcirc-user-dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-menu .mpcirc-user-info {
    padding: 12px 16px 8px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 4px;
}

body.mpcirc-circle-page .mpcirc-user-name {
    display: block;
    color: #0f141a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-menu a {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: #374151;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

body.mpcirc-circle-page .mpcirc-user-dropdown-menu a:hover,
body.mpcirc-circle-page .mpcirc-user-dropdown-menu a:focus {
    background-color: #f9fafb;
    color: #1da69a;
    outline: none;
}

/* Mobile adjustments for user dropdown */
@media (max-width: 768px) {

    body.mpcirc-circle-page .mpcirc-user-dropdown-toggle {
        width: 36px;
        height: 36px;
    }

    body.mpcirc-circle-page .mpcirc-user-avatar {
        width: 32px;
        height: 32px;
    }

    body.mpcirc-circle-page .mpcirc-user-dropdown-menu {
        min-width: 180px;
        right: -8px;
    }

}

/* ===== TYPOGRAPHY ===== */
body.mpcirc-circle-page #mpcirc-site-wrapper h1,
body.mpcirc-circle-page #mpcirc-site-wrapper h2,
body.mpcirc-circle-page #mpcirc-site-wrapper h3 {
    color: #0f141a;
    font-weight: 400;
}

body.mpcirc-circle-page #mpcirc-site-wrapper h1 {
    margin-bottom: 32px;
    font-size: 45px;
    line-height: 1.2;
}

body.mpcirc-circle-page .mpcirc-main-content > header > h1 {
    margin-top: 0 !important;
}

body.mpcirc-circle-page #mpcirc-site-wrapper h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 36px;
    line-height: 1.5;
}

body.mpcirc-circle-page #mpcirc-site-wrapper h2.mpcirc-latest-post-author-name {
    margin-bottom: 0;
}

body.mpcirc-circle-page #mpcirc-site-wrapper h2.mpcirc-circles-title {
    margin-top: -16px;
    margin-bottom: 10px;
    font-size: 34px;
}

body.mpcirc-circle-page #mpcirc-site-wrapper h3 {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== LAYOUT ===== */
/* Site wrapper setup for sticky footer */
body.mpcirc-circle-page #mpcirc-site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

body.mpcirc-circle-page #mpcirc-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== NAVIGATION ===== */
body.mpcirc-circle-page .mpcirc-page-navigation ul,
body.mpcirc-circle-page .mpcirc-footer-nav ul {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    list-style: none;
}

body.mpcirc-circle-page .mpcirc-footer-nav ul li a:hover {
    text-decoration: underline;
}

/* ===== MAIN CONTENT ===== */
body.mpcirc-circle-page #mpcirc-main-content {
    flex-grow: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 15px 30px;
}

body.mpcirc-circle-page .mpcirc-main-hero {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.mpcirc-circle-page .mpcirc-main-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 20, 23, 0.5);
    z-index: 1;
}

body.mpcirc-circle-page .mpcirc-main-hero-heading {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #121417;
    font-size: 48px;
    font-weight: bold;
    text-align: center;
}

/* When background image is present */
body.mpcirc-circle-page .mpcirc-main-hero.has-image .mpcirc-main-hero-heading {
    margin-bottom: 0 !important;
    color: #ffffff !important;
}

/* When no background image is used */
body.mpcirc-circle-page .mpcirc-main-hero.no-image {
    height: auto;
    min-height: 100px;
    background-color: transparent;
    background-image: none;
}

body.mpcirc-circle-page .mpcirc-main-hero.no-image::before {
  display: none;
}

/* ===== PAGE NAVIGATION ===== */
body.mpcirc-circle-page .mpcirc-page-navigation {
    margin-bottom: 20px;
    padding: 16px;
    background: #f5f7f9;
    border-radius: 8px;
}

body.mpcirc-circle-page .mpcirc-page-navigation ul li {
    flex: 1;
}

/* More specific selectors to override WordPress/theme defaults */
body.mpcirc-circle-page .mpcirc-main-content .mpcirc-page-navigation ul,
body.mpcirc-circle-page main .mpcirc-page-navigation ul {
    margin: 0;
    padding: 0;
}

body.mpcirc-circle-page .mpcirc-main-content .mpcirc-page-navigation ul,
body.mpcirc-circle-page .mpcirc-main-content .mpcirc-members-filter ul,
body.mpcirc-circle-page main .mpcirc-page-navigation ul,
body.mpcirc-circle-page main .mpcirc-members-filter ul,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-page-navigation ul,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-members-filter ul {
    list-style: none;
    list-style-type: none;
    list-style-image: none;
}

body.mpcirc-circle-page .mpcirc-main-content .mpcirc-page-navigation ul li,
body.mpcirc-circle-page .mpcirc-main-content .mpcirc-members-filter ul li,
body.mpcirc-circle-page main .mpcirc-page-navigation ul li,
body.mpcirc-circle-page main .mpcirc-members-filter ul li,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-page-navigation ul li,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-members-filter ul li {
    list-style: none;
    list-style-type: none;
    list-style-image: none;
}

/* Additional defensive CSS for common WordPress patterns */
body.mpcirc-circle-page .mpcirc-page-navigation ul li:before,
body.mpcirc-circle-page .mpcirc-members-filter ul li:before,
body.mpcirc-circle-page .mpcirc-members-filter-list li:before {
    content: none;
    display: none;
}

body.mpcirc-circle-page .mpcirc-page-navigation ul li a {
    width: 100%;
    padding: 10px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #2c3637;
    font-size: 14px;
    text-decoration: none;
    box-sizing: border-box;
}

body.mpcirc-circle-page .mpcirc-page-navigation ul li a:hover,
body.mpcirc-circle-page .mpcirc-page-navigation ul li a:active,
body.mpcirc-circle-page .mpcirc-page-navigation ul li a.active {
    background: #1da69a;
    color: #fff;
    transition: all 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-page-navigation ul li a:focus-visible {
    border-color: #06429e;
}

/* Navigation icons - shared properties */
body.mpcirc-circle-page .mpcirc-page-navigation-icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position-y: center;
}

body.mpcirc-circle-page .mpcirc-page-navigation-icon-feed {
    background-image: url('../images/feed-icon.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation-icon-rules {
    background-size: 17px;
    background-image: url('../images/rules-icon.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation-icon-members {
    background-image: url('../images/members-icon.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation-icon-settings {
    background-image: url('../images/settings-icon.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation-icon-moderation {
    background-size: 17px;
    background-image: url('../images/moderation-icon.svg');
}

/* Active state icons */
body.mpcirc-circle-page .mpcirc-page-navigation a:hover .mpcirc-page-navigation-icon-feed,
body.mpcirc-circle-page .mpcirc-page-navigation a:active .mpcirc-page-navigation-icon-feed,
body.mpcirc-circle-page .mpcirc-page-navigation a.active .mpcirc-page-navigation-icon-feed {
    background-image: url('../images/feed-icon-active.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation a:hover .mpcirc-page-navigation-icon-rules,
body.mpcirc-circle-page .mpcirc-page-navigation a:active .mpcirc-page-navigation-icon-rules,
body.mpcirc-circle-page .mpcirc-page-navigation a.active .mpcirc-page-navigation-icon-rules {
    background-image: url('../images/rules-icon-active.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation a:hover .mpcirc-page-navigation-icon-members,
body.mpcirc-circle-page .mpcirc-page-navigation a:active .mpcirc-page-navigation-icon-members,
body.mpcirc-circle-page .mpcirc-page-navigation a.active .mpcirc-page-navigation-icon-members {
    background-image: url('../images/members-icon-active.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation a:hover .mpcirc-page-navigation-icon-settings,
body.mpcirc-circle-page .mpcirc-page-navigation a:active .mpcirc-page-navigation-icon-settings,
body.mpcirc-circle-page .mpcirc-page-navigation a.active .mpcirc-page-navigation-icon-settings {
    background-image: url('../images/settings-icon-active.svg');
}

body.mpcirc-circle-page .mpcirc-page-navigation a:hover .mpcirc-page-navigation-icon-moderation,
body.mpcirc-circle-page .mpcirc-page-navigation a:active .mpcirc-page-navigation-icon-moderation,
body.mpcirc-circle-page .mpcirc-page-navigation a.active .mpcirc-page-navigation-icon-moderation {
    background-image: url('../images/moderation-icon-active.svg');
}

/* ===== SEARCH AND FILTER ===== */
body.mpcirc-circle-page .mpcirc-search-and-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

body.mpcirc-circle-page .mpcirc-search-container {
    position: relative;
    width: 100%;
    max-width: 330px;
}

/* Search input styles */
body.mpcirc-circle-page .mpcirc-search-input {
    width: 100%;
    padding: 12px 16px 12px 45px !important;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    outline: none;
    color: #2c3637;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-search-input:focus {
    border-color: #06429e;
    box-shadow: 0 0 0 2px rgba(6, 66, 158, 0.1);
}

body.mpcirc-circle-page .mpcirc-search-input::placeholder {
    color: #9ca3af;
}

/* Search icon */
body.mpcirc-circle-page .mpcirc-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 20px;
    height: 20px;
    background-image: url('../images/search-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transform: translateY(-50%);
}

/* Custom Dropdown */
body.mpcirc-circle-page .mpcirc-custom-dropdown {
    position: relative;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
}

body.mpcirc-circle-page .mpcirc-dropdown-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    color: #2c3637;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-custom-dropdown:hover .mpcirc-dropdown-selected {
    border-color: #bfbfbf;
}

body.mpcirc-circle-page .mpcirc-custom-dropdown:focus .mpcirc-dropdown-selected,
body.mpcirc-circle-page .mpcirc-custom-dropdown[aria-expanded="true"] .mpcirc-dropdown-selected {
    border-color: #06429e;
    box-shadow: 0 0 0 2px rgba(6, 66, 158, 0.1);
}

body.mpcirc-circle-page .mpcirc-dropdown-arrow {
    color: #666;
    transition: transform 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-custom-dropdown[aria-expanded="true"] .mpcirc-dropdown-arrow {
    transform: rotate(180deg);
}

body.mpcirc-circle-page .mpcirc-dropdown-options {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    margin-top: 8px;
    padding: 8px 0;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-custom-dropdown[aria-expanded="true"] .mpcirc-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.mpcirc-circle-page #mpcirc-main-content .mpcirc-dropdown-options .mpcirc-dropdown-option,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-dropdown-option {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #2c3637;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: none;
    text-decoration: none;
    line-height: normal;
}

body.mpcirc-circle-page #mpcirc-main-content .mpcirc-dropdown-options .mpcirc-dropdown-option:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-dropdown-options .mpcirc-dropdown-option:focus,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-dropdown-option:hover,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-dropdown-option:focus {
    background-color: #1da69a;
    color: #fff;
    outline: none;
    transform: none;
}

body.mpcirc-circle-page #mpcirc-main-content .mpcirc-dropdown-options .mpcirc-dropdown-option[aria-selected="true"],
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-dropdown-option[aria-selected="true"] {
    background-color: #1da69a;
    color: #fff;
}

body.mpcirc-circle-page #mpcirc-main-content .mpcirc-dropdown-options .mpcirc-dropdown-option[aria-selected="true"]:hover,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-dropdown-option[aria-selected="true"]:hover {
    background-color: #177a6f;
}

/* ===== circle GRIDS ===== */
body.mpcirc-circle-page .mpcirc-circles-section {
    margin-bottom: 40px;
}

body.mpcirc-circle-page .mpcirc-circles-title {
    margin-bottom: 20px;
    color: #0f141a;
    font-size: 24px;
    font-weight: 600;
}

body.mpcirc-circle-page .mpcirc-circles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 20px;
    row-gap: 48px;
}

body.mpcirc-circle-page .mpcirc-circle-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-circle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.mpcirc-circle-page .mpcirc-circle-card:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
    border-radius: 12px;
}

body.mpcirc-circle-page .mpcirc-circle-image {
    width: 100%;
    max-width: 160px;
    height: 160px;
    object-fit: cover;
    margin-bottom: 12px;
    background-color: #f5f7f9;
    border-radius: 8px;
    transition: opacity 0.2s ease;
}

/* Special handling for no-image placeholder */
body.mpcirc-circle-page .mpcirc-circle-image[src*="circle-no-img"] {
    object-fit: none;
    object-position: center;
    background-color: #c7c9cc;
    background-image: url('../images/circle-no-img.png');
    background-size: 60px 60px;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    color: transparent;
}

body.mpcirc-circle-page .mpcirc-circle-card:hover .mpcirc-circle-image {
    opacity: 0.9;
}

body.mpcirc-circle-page .mpcirc-circle-title {
    margin: 0;
    color: #0f141a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

body.mpcirc-circle-page .mpcirc-circle-card:hover .mpcirc-circle-title {
    color: #1da69a;
}

/* Explore All circles Button */
body.mpcirc-circle-page .mpcirc-explore-all-button-container {
    display: flex;
    justify-content: center;
    margin-top: 64px;
}

body.mpcirc-circle-page .mpcirc-explore-all-button {
    padding: 18px 36px;
    background-color: #1da69a;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

body.mpcirc-circle-page .mpcirc-explore-all-button:visited {
    color: #fff;
}

body.mpcirc-circle-page .mpcirc-explore-all-button:hover {
    background-color: #168a7f;
    color: #fff;
    transform: translateY(-1px);
}

body.mpcirc-circle-page .mpcirc-explore-all-button:focus-visible {
    outline: 2px solid #1da69a;
    outline-offset: 2px;
}

body.mpcirc-circle-page #mpcirc-main-content p {
    margin-bottom: 20px;
    color: #59738c;
    line-height: 1.5;
}

body.mpcirc-circle-page .mpcirc-guidelines-list {
    margin-top: 30px;
}

body.mpcirc-circle-page .mpcirc-guidelines-list-item {
    margin-bottom: 16px;
}

body.mpcirc-circle-page .mpcirc-guidelines-list-content,
body.mpcirc-circle-page .mpcirc-guidelines-content {
    padding: 20px;
    background: #f5f7f9;
    border-radius: 8px;
    font-size: 14px;
}

/* Single rule page styles */
body.mpcirc-circle-page .mpcirc-single-rule {
    max-width: none;
}

body.mpcirc-circle-page .mpcirc-single-rule header {
    margin-bottom: 30px;
}

body.mpcirc-circle-page .mpcirc-single-rule h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.5;
}

body.mpcirc-circle-page .mpcirc-rule-summary {
    margin-bottom: 0;
    color: #59738c;
    font-size: 16px;
    font-weight: 400;
}

body.mpcirc-circle-page section.mpcirc-guidelines-content ul {
    margin: 12px 0 !important;
    padding-left: 24px;
}

body.mpcirc-circle-page section.mpcirc-guidelines-content ul li {
    margin-bottom: 8px;
}

body.mpcirc-circle-page section.mpcirc-guidelines-content ul li:last-child {
    margin-bottom: 0;
}

/* ===== FOOTER ===== */
body.mpcirc-circle-page #mpcirc-site-footer {
    padding: 40px 20px;
    background-color: #fff;
    border-top: 1px solid #d9d9d9;
    color: #6c757d;
}

body.mpcirc-circle-page #mpcirc-footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
}

body.mpcirc-circle-page .mpcirc-footer-info {
    color: #2c3637;
}

body.mpcirc-circle-page .mpcirc-footer-info p {
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-footer-nav ul li a {
    padding: 15px 20px;
    color: #06429e;
    text-decoration: none;
}

/* ===== POSTS AND CARDS ===== */
body.mpcirc-circle-page .mpcirc-muted-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    color: #856404;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

body.mpcirc-circle-page .mpcirc-muted-notice p {
    margin: 0 0 8px 0;
}

body.mpcirc-circle-page .mpcirc-muted-notice p:last-child {
    margin-bottom: 0;
}

body.mpcirc-circle-page .mpcirc-latest-posts {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
}

body.mpcirc-circle-page .mpcirc-latest-post {
    overflow: visible;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-latest-post:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Post sections with shared white background */
body.mpcirc-circle-page .mpcirc-latest-post-image,
body.mpcirc-circle-page .mpcirc-latest-post-content,
body.mpcirc-circle-page .mpcirc-latest-post-footer,
body.mpcirc-circle-page .mpcirc-latest-post-comments {
    background: #fff;
}

body.mpcirc-circle-page .mpcirc-latest-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f5f7f9;
    border-bottom: 1px solid #e5e8eb;
}

body.mpcirc-circle-page .mpcirc-latest-post-author {
    gap: 12px;
}

body.mpcirc-circle-page .mpcirc-latest-post-author,
body.mpcirc-circle-page .mpcirc-latest-post-meta {
    display: flex;
    align-items: center;
}

body.mpcirc-circle-page .mpcirc-latest-post-meta {
    gap: 12px;
}

body.mpcirc-circle-page .mpcirc-latest-post-author img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

body.mpcirc-circle-page .mpcirc-latest-post-author-info {
    display: flex;
    flex-direction: column;
}

body.mpcirc-circle-page .mpcirc-latest-post-author-name {
    color: #0f141a;
    font-weight: 500;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-latest-post-author-role,
body.mpcirc-circle-page .mpcirc-latest-post-date {
    color: #6b7280;
    font-size: 12px;
}

/* Post image */
body.mpcirc-circle-page .mpcirc-latest-post-image {
    padding: 0;
}

body.mpcirc-circle-page .mpcirc-latest-post-image img {
    display: block;
    width: 100%;
    height: 500px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
}

/* Post content */
body.mpcirc-circle-page .mpcirc-latest-post-content {
    padding: 20px;
}

body.mpcirc-circle-page .mpcirc-latest-post-content p {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

/* Post footer */
body.mpcirc-circle-page .mpcirc-latest-post-footer {
    gap: 24px;
    padding: 16px 20px;
    border-top: 1px solid #e2e8ee;
    border-bottom: 1px solid #e2e8ee;
}

body.mpcirc-circle-page .mpcirc-latest-post-footer-likes,
body.mpcirc-circle-page .mpcirc-latest-post-footer-comments {
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-latest-post-footer-likes,
body.mpcirc-circle-page .mpcirc-latest-post-footer-comments,
body.mpcirc-circle-page .mpcirc-latest-post-footer {
    display: flex;
    align-items: center;
}

body.mpcirc-circle-page .mpcirc-latest-post-footer-likes:hover,
body.mpcirc-circle-page .mpcirc-latest-post-footer-comments:hover {
    color: #1da69a;
}

/* Active reaction state */
body.mpcirc-circle-page .mpcirc-latest-post-footer-icon.mpcirc-latest-post-footer-likes-icon.mpcirc-reaction-active {
    background-image: url('../images/like-icon-active.svg');
}

/* Footer icons */
body.mpcirc-circle-page .mpcirc-latest-post-footer-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background-color: #f5f7f9;
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
}

body.mpcirc-circle-page button.mpcirc-latest-post-footer-icon,
body.mpcirc-circle-page button.mpcirc-comment-like-icon {
    margin: 0;
    padding: 0;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

body.mpcirc-circle-page button.mpcirc-latest-post-footer-icon:hover {
    background-color: #e5e7eb;
}

body.mpcirc-circle-page button.mpcirc-reaction-disabled,
body.mpcirc-circle-page button.mpcirc-reaction-disabled:hover {
    cursor: default !important;
    opacity: 0.6 !important;
}

body.mpcirc-circle-page button.mpcirc-reaction-disabled:hover {
    background-image: url('../images/like-icon.svg') !important;
}

body.mpcirc-circle-page div.mpcirc-reaction-disabled,
body.mpcirc-circle-page span.mpcirc-reaction-disabled {
    cursor: default !important;
}

body.mpcirc-circle-page .mpcirc-latest-post-footer-likes-icon {
    background-image: url('../images/like-icon.svg');
}

body.mpcirc-circle-page .mpcirc-latest-post-footer-comments-icon {
    background-image: url('../images/comment-icon.svg');
}

body.mpcirc-circle-page .mpcirc-latest-post-footer-likes-count,
body.mpcirc-circle-page .mpcirc-latest-post-footer-comments-count {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

/* ===== ACTIONS AND MODALS ===== */
/* Actions dropdown */
body.mpcirc-circle-page .mpcirc-latest-post-actions-wrapper,
body.mpcirc-circle-page .mpcirc-latest-post-actions {
    position: relative;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-dots {
    display: block;
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    padding: 0;
    background-color: transparent;
    background-image: url('../images/dots-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

/* Ensure action dots buttons are below active modals */
body.mpcirc-circle-page .mpcirc-modal-base.active ~ * .mpcirc-latest-post-action-dots,
body.mpcirc-circle-page .mpcirc-post-hidden-banned ~ * .mpcirc-latest-post-action-dots {
    z-index: 0;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-dots:hover,
body.mpcirc-circle-page .mpcirc-latest-post-action-dots:focus {
    opacity: 0.7;
    background-color: inherit !important;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-dots:focus-visible {
    border-radius: 4px;
    outline: 1px solid #06429e;
    outline-offset: 2px;
}

/* Base modal container - shared styles for all modals */
body.mpcirc-circle-page .mpcirc-modal-base {
    display: none;
    position: absolute;
    top: 100%;
    width: 330px;
    z-index: 100;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.mpcirc-circle-page .mpcirc-modal-base.mpcirc-comment-author-profile {
    top: 50px;
}

body.mpcirc-circle-page .mpcirc-modal-base.active {
    display: block;
    z-index: 1000;
}

/* Shared close button styles */
body.mpcirc-circle-page .mpcirc-modal-close-btn {
    width: 20px;
    height: 20px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0;
}

body.mpcirc-circle-page .mpcirc-modal-close-btn,
body.mpcirc-circle-page .mpcirc-modal-close-x {
    display: flex;
    justify-content: center;
    align-items: center;
}

body.mpcirc-circle-page .mpcirc-modal-close-btn:hover,
body.mpcirc-circle-page .mpcirc-modal-close-btn:focus {
    background: none !important;
}

/* Shared X icon for close buttons */
body.mpcirc-circle-page .mpcirc-modal-close-x::before,
body.mpcirc-circle-page .mpcirc-modal-close-x::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: #9ca3af;
    transition: background 0.2s ease;
    pointer-events: none; /* Allow clicks to pass through to button */
    z-index: 1; /* Keep pseudo-elements below button */
}

body.mpcirc-circle-page .mpcirc-modal-close-x::before {
    transform: rotate(45deg);
}

body.mpcirc-circle-page .mpcirc-modal-close-x::after {
    transform: rotate(-45deg);
}

body.mpcirc-circle-page .mpcirc-modal-close-x:hover::before,
body.mpcirc-circle-page .mpcirc-modal-close-x:hover::after {
    background: #1da69a;
}

/* Shared button styles for modal buttons */
body.mpcirc-circle-page .mpcirc-modal-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-modal-btn:hover {
    background: #1da69a;
    border-color: #1da69a;
    color: #fff;
}

body.mpcirc-circle-page .mpcirc-modal-btn-danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

body.mpcirc-circle-page .mpcirc-modal-btn-danger:hover
.mpcirc-modal-btn-danger:focus {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Post action modal - extends base modal */
body.mpcirc-circle-page .mpcirc-latest-post-action-content {
    right: 0;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-content p {
    margin: 0 0 12px 0;
    padding-right: 24px; /* Add space for the close button */
    color: #0f141a;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-content-buttons {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-content-button-cancel {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10; /* Ensure button is above pseudo-elements */
    pointer-events: auto; /* Ensure button can receive clicks */
}

body.mpcirc-circle-page .mpcirc-latest-post-action-content-button-report,
body.mpcirc-circle-page .mpcirc-latest-post-action-content-button-edit,
body.mpcirc-circle-page .mpcirc-latest-post-action-content-button-delete {
    width: 100%;
}

body.mpcirc-circle-page .mpcirc-latest-post-action-content-button-report,
body.mpcirc-circle-page .mpcirc-latest-post-action-content-button-edit {
    border-color: #c6c4c4;
    font-size: 16px;
}

body.mpcirc-circle-page .mpcirc-link-btn {
    text-decoration: none;
    text-align: center;
}

body.mpcirc-circle-page .mpcirc-link-btn:active:not(:hover),
body.mpcirc-circle-page .mpcirc-link-btn:visited:not(:hover) {
    text-decoration: none;
    text-align: center;
    color: #374151 !important;
}

/* ===== REPORT FORM MODAL ===== */
body.mpcirc-circle-page .mpcirc-latest-post-report-form {
    right: 0;
    width: 350px !important;
}

/* ===== DROPDOWN ALIGNMENT FIXES ===== */
/* Ensure all dropdown modals align to the right edge of their container */
body.mpcirc-circle-page .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base,
body.mpcirc-circle-page .mpcirc-member-actions-wrapper .mpcirc-modal-base {
    right: 0;
    left: auto;
    transform: translateX(0);
}

/* Specific alignment for post action content */
body.mpcirc-circle-page .mpcirc-latest-post-action-content {
  right: 0;
  left: auto;
}

/* Upward positioning when modal would be clipped at bottom */
body.mpcirc-circle-page .mpcirc-latest-post-action-content.mpcirc-position-up {
  top: auto;
  bottom: 100%;
  margin-bottom: 4px;
}

/* Upward positioning for secondary modals (Ban Member, Remove Member, Mute Member, etc.) */
body.mpcirc-circle-page .mpcirc-action-items-form.mpcirc-position-up,
body.mpcirc-circle-page .mpcirc-member-remove-form.mpcirc-position-up,
body.mpcirc-circle-page .mpcirc-member-ban-form.mpcirc-position-up,
body.mpcirc-circle-page .mpcirc-member-mute-form.mpcirc-position-up {
  top: auto !important;
  bottom: 100% !important;
  margin-bottom: 4px;
}

/* Upward positioning for post action modals (Report, Delete) */
/* Note: Edit modals are excluded from this positioning - they're always centered via JS */
body.mpcirc-circle-page .mpcirc-latest-post-report-form.mpcirc-position-up,
body.mpcirc-circle-page .mpcirc-latest-post-delete-form.mpcirc-position-up {
  top: auto !important;
  bottom: 100% !important;
  margin-bottom: 4px;
}

/* Upward positioning for comment modals */
body.mpcirc-circle-page .mpcirc-comment-header .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base.mpcirc-position-up,
body.mpcirc-circle-page .mpcirc-comment .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base.mpcirc-position-up {
  top: auto !important;
  bottom: 100% !important;
  margin-bottom: 4px;
}

/* Ensure dropdowns don't go off-screen on smaller containers */
body.mpcirc-circle-page .mpcirc-comment-header .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base {
    right: 0;
    left: auto;
    max-width: calc(100vw - 20px);
    width: auto;
    min-width: 280px;
}

/* For very small screens, adjust positioning */
@media (max-width: 480px) {
    body.mpcirc-circle-page .mpcirc-comment-header .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base {
        right: 0;
        left: auto;
        width: calc(100vw - 40px);
        max-width: 320px;
    }

}

/* Additional positioning fixes for comment headers */
body.mpcirc-circle-page .mpcirc-comment-header {
    position: relative;
}

body.mpcirc-circle-page .mpcirc-comment-header .mpcirc-latest-post-actions-wrapper {
    position: relative;
    display: inline-block;
    margin-left: auto; /* Push to the right in flex container */
}

/* Ensure the dropdown appears above other content */
body.mpcirc-circle-page .mpcirc-comment-header .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base {
    z-index: 1000;
    right: 0;
    left: auto;
    transform: translateX(0);
}

/* Fix for dropdowns in comment content areas */
body.mpcirc-circle-page .mpcirc-comment-content .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base {
    right: 0;
    left: auto;
    z-index: 1000;
}

/* Ensure dropdowns work in all post contexts */
body.mpcirc-circle-page .mpcirc-latest-post .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base,
body.mpcirc-circle-page .mpcirc-comment .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base {
    right: 0;
    left: auto;
    z-index: 1000;
}

/* Specific fix for comment header flex layout */
body.mpcirc-circle-page .mpcirc-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    position: relative;
}

/* Ensure the actions wrapper is positioned at the end of the flex container */
body.mpcirc-circle-page .mpcirc-comment-header .mpcirc-latest-post-actions-wrapper {
    margin-left: auto;
    flex-shrink: 0;
}

/* Force right alignment for dropdowns in comment headers */
body.mpcirc-circle-page .mpcirc-comment-header .mpcirc-latest-post-actions-wrapper .mpcirc-modal-base {
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    z-index: 1000;
    transform: translateX(0);
}

/* ===== EDIT POST MODAL ===== */
/* Modal backdrop - covers entire screen */
body.mpcirc-circle-page .mpcirc-edit-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
}

body.mpcirc-circle-page .mpcirc-edit-modal-backdrop.active {
    display: block;
}

body.mpcirc-circle-page .mpcirc-latest-post-edit-form {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    width: 100% !important;
    max-width: 960px !important;
    height: auto !important;
    overflow-y: visible !important;
    z-index: 1001 !important;
    padding: 24px !important;
    transform: translate(-50%, -50%) !important;
}

body.mpcirc-circle-page .mpcirc-edit-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-right: 0;
}

body.mpcirc-circle-page .mpcirc-edit-form-header h3 {
    margin: 0;
    color: #0f141a;
    font-size: 18px !important;
    font-weight: 600;
}

body.mpcirc-circle-page .mpcirc-edit-form-field {
    margin-bottom: 16px;
}

body.mpcirc-circle-page .mpcirc-edit-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

body.mpcirc-circle-page .mpcirc-edit-form-row .mpcirc-comment-form-input {
    flex: 1;
    min-height: 80px;
    resize: vertical;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
}

body.mpcirc-circle-page .mpcirc-edit-form-row .mpcirc-comment-form-input:focus,
body.mpcirc-circle-page .mpcirc-edit-form-row .mpcirc-comment-form-input {
    outline: 2px solid #d2d9e3;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-edit-form-image {
    position: relative;
    max-height: 240px;
    overflow: hidden;
    margin-bottom: 16px;
    border-radius: 12px;
}

body.mpcirc-circle-page .mpcirc-edit-form-image img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
}

body.mpcirc-circle-page .mpcirc-edit-image-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-edit-image-close-icon {
    position: relative;
    width: 14px;
    height: 14px;
}

body.mpcirc-circle-page .mpcirc-edit-image-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

body.mpcirc-circle-page .mpcirc-edit-image-close-icon::before,
body.mpcirc-circle-page .mpcirc-edit-image-close-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: #fff;
    transition: background 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-edit-image-close-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

body.mpcirc-circle-page .mpcirc-edit-image-close-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

body.mpcirc-circle-page .mpcirc-edit-form-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

body.mpcirc-circle-page .mpcirc-latest-post-edit-form button.mpcirc-edit-cancel-btn,
body.mpcirc-circle-page .mpcirc-latest-post-edit-form .mpcirc-edit-cancel-btn,
body.mpcirc-circle-page button.mpcirc-edit-cancel-btn,
body.mpcirc-circle-page .mpcirc-edit-cancel-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    text-decoration: none;
    line-height: normal;
}

body.mpcirc-circle-page .mpcirc-latest-post-edit-form button.mpcirc-edit-cancel-btn:hover,
body.mpcirc-circle-page .mpcirc-latest-post-edit-form .mpcirc-edit-cancel-btn:hover,
body.mpcirc-circle-page button.mpcirc-edit-cancel-btn:hover,
body.mpcirc-circle-page .mpcirc-edit-cancel-btn:hover {
    background: #1da69a;
    border-color: #1da69a;
    color: #fff;
    transform: none;
}

body.mpcirc-circle-page .mpcirc-latest-post-edit-form button.mpcirc-edit-submit-btn,
body.mpcirc-circle-page .mpcirc-latest-post-edit-form .mpcirc-edit-submit-btn,
body.mpcirc-circle-page button.mpcirc-edit-submit-btn,
body.mpcirc-circle-page .mpcirc-edit-submit-btn {
    padding: 8px 16px;
    background: #1da69a;
    border: 1px solid #1da69a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    text-decoration: none;
    line-height: normal;
}

body.mpcirc-circle-page .mpcirc-latest-post-edit-form button.mpcirc-edit-submit-btn:hover,
body.mpcirc-circle-page .mpcirc-latest-post-edit-form .mpcirc-edit-submit-btn:hover,
body.mpcirc-circle-page button.mpcirc-edit-submit-btn:hover,
body.mpcirc-circle-page .mpcirc-edit-submit-btn:hover {
    background: #168a80;
    border-color: #168a80;
    transform: none;
}

body.mpcirc-circle-page .mpcirc-latest-post-edit-form button.mpcirc-edit-submit-btn:focus-visible,
body.mpcirc-circle-page .mpcirc-latest-post-edit-form .mpcirc-edit-submit-btn:focus-visible,
body.mpcirc-circle-page .mpcirc-latest-post-edit-form button.mpcirc-edit-cancel-btn:focus-visible,
body.mpcirc-circle-page .mpcirc-latest-post-edit-form .mpcirc-edit-cancel-btn:focus-visible,
body.mpcirc-circle-page button.mpcirc-edit-submit-btn:focus-visible,
body.mpcirc-circle-page .mpcirc-edit-submit-btn:focus-visible,
body.mpcirc-circle-page button.mpcirc-edit-cancel-btn:focus-visible,
body.mpcirc-circle-page .mpcirc-edit-cancel-btn:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

/* ===== ACTION ITEMS FORM (Generic styling for all action modals) ===== */
body.mpcirc-circle-page .mpcirc-action-items-form {
    right: 0;
    width: 350px;
}

/* ===== ACTION ITEMS FORM (Generic styling for all action modals) ===== */
body.mpcirc-circle-page .mpcirc-action-items-form {
    right: 0;
    width: 350px;
}

body.mpcirc-circle-page .mpcirc-latest-post-report-form h3 {
    margin: 0 0 8px 0;
    padding-right: 24px; /* Space for close button */
    color: #0f141a;
    font-size: 18px !important;
    font-weight: 600;
}

body.mpcirc-circle-page .mpcirc-action-form-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-right: 24px; /* Space for close button */
}

body.mpcirc-circle-page .mpcirc-action-form-icon {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
    background: #fef2f2; /* Light red background */
    border-radius: 50%;
}

body.mpcirc-circle-page .mpcirc-action-form-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 36px;
    height: 36px;
    background: #fee4e2; /* Slightly darker red background */
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

body.mpcirc-circle-page .mpcirc-action-form-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 20px;
    height: 20px;
    background-image: url('../images/delete-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translate(-50%, -50%);
}

body.mpcirc-circle-page .mpcirc-action-items-form h3 {
    margin: 0;
    color: #0f141a;
    font-size: 18px !important;
    font-weight: 600;
    text-align: left;
}

body.mpcirc-circle-page .mpcirc-latest-post-report-form p,
body.mpcirc-circle-page .mpcirc-action-items-form p {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

body.mpcirc-circle-page .mpcirc-report-form-field {
    margin-bottom: 16px;
}

body.mpcirc-circle-page .mpcirc-report-textarea {
    width: 100%;
    min-height: 72px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-report-textarea:focus {
    border-color: #1da69a;
    outline: none;
}

body.mpcirc-circle-page .mpcirc-report-textarea::placeholder {
    color: #9ca3af;
}

body.mpcirc-circle-page .mpcirc-report-char-count {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    text-align: left;
}

body.mpcirc-circle-page .mpcirc-report-char-count.over-limit {
    color: #dc2626;
}

body.mpcirc-circle-page .mpcirc-report-form-buttons,
body.mpcirc-circle-page .mpcirc-action-form-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.mpcirc-circle-page .mpcirc-report-submit-btn,
body.mpcirc-circle-page .mpcirc-report-cancel-btn,
body.mpcirc-circle-page .mpcirc-delete-submit-btn,
body.mpcirc-circle-page .mpcirc-delete-cancel-btn {
    flex: 1;
    width: 100%;
}

body.mpcirc-circle-page .mpcirc-ban-member-text {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

body.mpcirc-circle-page .mpcirc-report-form-close,
body.mpcirc-circle-page .mpcirc-action-form-close,
body.mpcirc-circle-page .mpcirc-remove-form-close,
body.mpcirc-circle-page .mpcirc-ban-form-close,
body.mpcirc-circle-page .mpcirc-mute-form-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

/* ===== COMMENTS ===== */
body.mpcirc-circle-page .mpcirc-latest-post-comments {
    padding: 0 20px 20px;
}

/* Comment author wrapper positioning */
body.mpcirc-circle-page .mpcirc-comment-author-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

/* Comment author profile modal - extends base modal */
body.mpcirc-circle-page .mpcirc-comment-author-profile {
    left: 0;
    margin-top: 8px;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-header {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-header,
body.mpcirc-circle-page .mpcirc-comment-author-profile-info {
    display: flex;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-info {
    align-items: center;
    flex: 1;
    gap: 12px;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-details {
    display: flex;
    flex-direction: column;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-name {
    margin-bottom: 2px;
    color: #0f141a;
    font-weight: 500;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-role {
    color: #6b7280;
    font-size: 12px;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-close {
    flex-shrink: 0;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-buttons {
    display: flex;
    gap: 8px;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-btn,
body.mpcirc-circle-page a.mpcirc-comment-author-profile-btn {
    flex: 1;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #e2e8ee;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-btn-posts:hover,
body.mpcirc-circle-page a.mpcirc-comment-author-profile-btn-posts:hover {
    background: #f5f7f9;
    border-color: #1da69a;
    color: #1da69a;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-btn-profile,
body.mpcirc-circle-page a.mpcirc-comment-author-profile-btn-profile {
    background: #1da69a;
    border-color: #1da69a;
    color: #fff;
}

body.mpcirc-circle-page .mpcirc-comment-author-profile-btn-profile:hover,
body.mpcirc-circle-page a.mpcirc-comment-author-profile-btn-profile:hover {
    background: #168a80;
    border-color: #168a80;
    color: #fff;
}

/* Make comment authors clickable */
body.mpcirc-circle-page .mpcirc-comment-author-clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Small spinner for buttons */
body.mpcirc-circle-page .mpcirc-btn-spinner {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

body.mpcirc-circle-page .mpcirc-spinner-small {
    width: 12px;
    height: 12px;
    border: 2px solid #e2e8ee;
    border-top: 2px solid #1da69a;
    border-radius: 50%;
    animation: mpcirc-spin 1s linear infinite;
}

@keyframes mpcirc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* New comment highlight animation */
@keyframes mpcirc-comment-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-10px);
        background-color: rgba(29, 166, 154, 0.1);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
        background-color: rgba(29, 166, 154, 0.2);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        background-color: transparent;
    }
}

body.mpcirc-circle-page .mpcirc-comment-newly-added {
    animation: mpcirc-comment-fade-in 2s ease-out;
    padding: 12px 0;
}

body.mpcirc-circle-page .mpcirc-comment-author-clickable:hover {
    color: #1da69a;
}

/* Comment styles */
body.mpcirc-circle-page .mpcirc-comment {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f7f9;
}

body.mpcirc-circle-page .mpcirc-comment:last-child,
body.mpcirc-circle-page .mpcirc-comment-child:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

/* Make comment form appear on new line when it's a direct child of comment */
body.mpcirc-circle-page .mpcirc-comment > .mpcirc-latest-post-comment-form {
    flex-basis: 100%;
    margin-top: 8px;
    padding: 0;
}

body.mpcirc-circle-page .mpcirc-comment-avatar,
body.mpcirc-circle-page .mpcirc-comment-form-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 50%;
}

body.mpcirc-circle-page .mpcirc-comment-content {
    flex: 1;
}

body.mpcirc-circle-page .mpcirc-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

body.mpcirc-circle-page .mpcirc-comment-author {
    color: #0f141a;
    font-weight: 600;
    font-size: 12px;
}

body.mpcirc-circle-page .mpcirc-comment-date {
    color: #6b7280;
    font-size: 11px;
}

body.mpcirc-circle-page .mpcirc-comment-text {
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

body.mpcirc-circle-page .mpcirc-comment-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.mpcirc-circle-page .mpcirc-comment-like-icon {
    width: 14px;
    height: 14px;
    background-color: transparent;
    background-image: url('../images/like-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

body.mpcirc-circle-page .mpcirc-comment-like-icon:hover,
body.mpcirc-circle-page .mpcirc-comment-like-icon:active,
body.mpcirc-circle-page .mpcirc-comment-like-icon.mpcirc-reaction-active {
    background-color: inherit !important;
    background-image: url('../images/like-icon-active.svg');
}

body.mpcirc-circle-page .mpcirc-comment-like-count {
    color: #6b7280;
    font-size: 11px;
    font-weight: 500;
    line-height: 11px;
}

/* Reply button styles */
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-comment-reply-btn,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-comment-reply-btn {
    padding: 0;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 5px;
    box-shadow: none;
    text-decoration: none;
    line-height: normal;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-comment-reply-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-comment-reply-btn:hover {
    background-color: transparent;
    background: none;
    color: #1da69a;
    transform: none;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-comment-reply-btn:focus-visible,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-comment-reply-btn:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reply icon styles */
body.mpcirc-circle-page .mpcirc-comment-reply-icon {
    width: 12px;
    height: 12px;
    background-image: url('../images/comment-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-comment-reply-btn:hover .mpcirc-comment-reply-icon {
    opacity: 1;
}

/* Reply form container */
body.mpcirc-circle-page .mpcirc-comment-reply-form-container {
    margin-top: 8px;
    padding-left: 44px; /* Avatar width (32px) + gap (12px) for proper alignment */
}

body.mpcirc-circle-page .mpcirc-comment-reply-form {
    margin: 0;
}

/* Child comment styles */
body.mpcirc-circle-page .mpcirc-comment-children {
    flex-basis: 100%; /* Make it take full width and wrap to new line */
    margin-top: 8px;
    padding-left: 44px; /* Avatar width (32px) + gap (12px) for proper alignment */
}

body.mpcirc-circle-page .mpcirc-comment-child {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f7f9;
}

/* ===== COMMENT FORMS ===== */
body.mpcirc-circle-page .mpcirc-latest-post-comment-form {
    padding: 0 20px 20px;
}

/* Shared form row styles */
body.mpcirc-circle-page .mpcirc-comment-form-row,
body.mpcirc-circle-page .mpcirc-post-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.mpcirc-circle-page .mpcirc-post-form-row {
    justify-content: flex-start;
    align-items: flex-start;
}

body.mpcirc-circle-page .mpcirc-comment-form-row .mpcirc-comment-form-avatar,
body.mpcirc-circle-page .mpcirc-post-form-row .mpcirc-post-form-avatar {
    margin-top: 8px;
    border-radius: 50%;
}

body.mpcirc-circle-page img.mpcirc-post-form-avatar {
    width: 56px;
}

/* Post form submit button */
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-submit-btn,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 16px 0 0 auto; /* push to right */
    padding: 12px 24px;
    background: #1da69a;
    border: 1px solid #1da69a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-decoration: none;
    line-height: normal;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-submit-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-submit-btn:hover {
    background: #0f8a7f;
    border-color: #0f8a7f;
    transform: translateY(-1px);
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-submit-btn:active,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-submit-btn:active {
    background: #0d7a6f;
    border-color: #0d7a6f;
    transform: translateY(0);
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-submit-btn:focus-visible,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-submit-btn:focus-visible {
    outline: 2px solid #1da69a;
    outline-offset: 2px;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-submit-btn:disabled,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-submit-btn:disabled:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-submit-btn:disabled,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-submit-btn:disabled:hover {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Comment form submit button */
body.mpcirc-circle-page .mpcirc-comment-form-submit-btn-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-form-comment-submit-btn,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-form-comment-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0 0 0 auto; /* push to right */
    padding: 8px 16px;
    background: #1da69a;
    border: 1px solid #1da69a;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    line-height: normal;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-form-comment-submit-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-form-comment-submit-btn:hover {
    background: #0f8a7f;
    border-color: #0f8a7f;
    transform: translateY(-1px);
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-form-comment-submit-btn:active,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-form-comment-submit-btn:active {
    background: #0d7a6f;
    border-color: #0d7a6f;
    transform: translateY(0);
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-form-comment-submit-btn:focus-visible,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-form-comment-submit-btn:focus-visible {
    outline: 2px solid #1da69a;
    outline-offset: 2px;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-form-comment-submit-btn:disabled,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-form-comment-submit-btn:disabled:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-form-comment-submit-btn:disabled,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-form-comment-submit-btn:disabled:hover {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Reply submit button - similar to comment submit button */
body.mpcirc-circle-page .mpcirc-form-reply-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0 0 0 auto; /* push to right */
    padding: 8px 16px;
    background: #1da69a;
    border: 1px solid #1da69a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

body.mpcirc-circle-page .mpcirc-form-reply-submit-btn:hover {
    background: #0f8a7f;
    border-color: #0f8a7f;
    transform: translateY(-1px);
}

body.mpcirc-circle-page .mpcirc-form-reply-submit-btn:active {
    background: #0d7a6f;
    border-color: #0d7a6f;
    transform: translateY(0);
}

body.mpcirc-circle-page .mpcirc-form-reply-submit-btn:focus-visible {
    outline: 2px solid #1da69a;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-form-reply-submit-btn:disabled,
body.mpcirc-circle-page .mpcirc-form-reply-submit-btn:disabled:hover {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Global Message Display */
body.mpcirc-circle-page .mpcirc-message-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
}

body.mpcirc-circle-page .mpcirc-message-display-item {
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
}

body.mpcirc-circle-page .mpcirc-message-display-item--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

body.mpcirc-circle-page .mpcirc-message-display-item--hiding {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

body.mpcirc-circle-page .mpcirc-message-display-item--success {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

body.mpcirc-circle-page .mpcirc-message-display-item--error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

body.mpcirc-circle-page .mpcirc-message-display-item--info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

body.mpcirc-circle-page .mpcirc-message-display-item--warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

/* Shared form action styles */
body.mpcirc-circle-page .mpcirc-comment-form-actions,
body.mpcirc-circle-page .mpcirc-post-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
}

body.mpcirc-circle-page .mpcirc-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8ee;
    border-radius: 8px;
}

/* Comment form input row */
body.mpcirc-circle-page .mpcirc-comment-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Comment form submit button container */
body.mpcirc-circle-page .mpcirc-comment-form > div:last-child {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Post creation form */
body.mpcirc-circle-page .mpcirc-post-creation-form {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

body.mpcirc-circle-page .mpcirc-post-creation-form .mpcirc-post-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    gap: 12px;
}

body.mpcirc-circle-page .mpcirc-comment-more a {
    color: #0f141a;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-comment-form-input,
body.mpcirc-circle-page .mpcirc-post-form-input {
    flex: 1;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #374151;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-comment-form-input::placeholder,
body.mpcirc-circle-page .mpcirc-post-form-input::placeholder {
    color: #9ca3af;
}

/* Textarea specific styles for post creation */
body.mpcirc-circle-page textarea.mpcirc-post-form-input {
    min-height: 60px;
    font-family: inherit;
    line-height: 1.4;
    resize: vertical;
}

/* Textarea specific styles for comment forms */
body.mpcirc-circle-page textarea.mpcirc-comment-form-input {
    height: 20px;
    min-height: 20px;
    overflow: hidden;
    padding-top: 2px;
    font-family: inherit;
    line-height: 1.4;
    vertical-align: top;
    resize: vertical;
    transition: height 0.3s ease;
}

body.mpcirc-circle-page textarea.mpcirc-comment-form-input:focus {
    height: 60px;
    padding-top: 12px;
    border-color: #d2d9e3;
    overflow-y: auto;
}

/* Form icons */
body.mpcirc-circle-page .mpcirc-comment-form-emoji,
body.mpcirc-circle-page .mpcirc-post-form-emoji {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-comment-form-icon,
body.mpcirc-circle-page .mpcirc-post-form-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
    margin-left: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-comment-form-emoji:hover,
body.mpcirc-circle-page .mpcirc-comment-form-icon:hover,
body.mpcirc-circle-page .mpcirc-post-form-emoji:hover,
body.mpcirc-circle-page .mpcirc-post-form-icon:hover {
    opacity: 1;
}

body.mpcirc-circle-page #mpcirc-main-content .mpcirc-comment-form-icon-btn,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-icon-btn,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-icon-btn,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-comment-form-icon-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    box-shadow: none;
    text-decoration: none;
    line-height: normal;
}

body.mpcirc-circle-page #mpcirc-main-content .mpcirc-comment-form-icon-btn:focus-visible,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-icon-btn:focus-visible,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-comment-form-icon-btn:focus-visible,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-icon-btn:focus-visible {
    border-radius: 2px;
    outline: 1px solid #06429e;
    outline-offset: 2px;
}

body.mpcirc-circle-page #mpcirc-main-content .mpcirc-comment-form-icon-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-comment-form-icon-btn:hover {
    background-color: transparent;
    background: none;
    transform: none;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-icon-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-icon-btn:active,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-post-form-icon:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-icon-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-post-form-icon-btn:active {
    background-color: transparent;
    background: none;
    transform: none;
}

body.mpcirc-circle-page .mpcirc-post-image-preview {
    display: flex;
    gap: 8px;
    margin-right: auto;
    align-items: center;
}

body.mpcirc-circle-page .mpcirc-image-wrapper {
    position: relative;
    display: inline-block;
}

body.mpcirc-circle-page .mpcirc-image-wrapper img {
    max-width: 300px;
    height: auto;        /* keeps aspect ratio */
    max-height: 300px;   /* prevents it from going too tall */
    object-fit: contain; /* or "cover" depending on need */
    border-radius: 6px;
    display: block;
}

body.mpcirc-circle-page .mpcirc-image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-image-remove,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #666;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    padding: 0;
    margin: 0;
    box-shadow: none;
    text-decoration: none;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-image-remove:hover,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-image-remove:hover {
    background: #333;
    transform: none;
}

body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-image-remove:active,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-image-remove:active {
    background: #222;
    transform: none;
}

body.mpcirc-circle-page .mpcirc-post-form-icon-btn--disabled {
    opacity: 0.5;
    pointer-events: none; /* prevents clicks */
    cursor: not-allowed;
}

/* ===== PAGINATION ===== */
body.mpcirc-circle-page .mpcirc-pagination {
    gap: 16px;
    margin: 32px 0 0;
    padding: 20px;
}

body.mpcirc-circle-page .mpcirc-pagination,
body.mpcirc-circle-page .mpcirc-pagination-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

body.mpcirc-circle-page .mpcirc-pagination-btn {
    width: 40px;
    height: 40px;
    padding: 0 !important;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

body.mpcirc-circle-page .mpcirc-pagination-btn:hover {
    background: #f5f7f9;
    border-color: #1da69a;
    color: #1da69a;
}

body.mpcirc-circle-page .mpcirc-pagination-btn:active {
    background: #1da69a;
    border-color: #1da69a;
    color: #fff;
}

body.mpcirc-circle-page .mpcirc-pagination-btn:disabled {
    background: #f5f7f9;
    border-color: #e5e8eb;
    color: #9ca3af;
    cursor: not-allowed;
}

body.mpcirc-circle-page .mpcirc-pagination-btn:disabled:hover {
    background: #f5f7f9;
    border-color: #e5e8eb;
    color: #9ca3af;
}

body.mpcirc-circle-page .mpcirc-pagination-btn svg {
    width: 20px;
    height: 20px;
}

/* High specificity selector to override theme button styles */
body.mpcirc-circle-page .mpcirc-pagination button.mpcirc-pagination-btn {
    margin: 0;
    padding: 0 !important;
    line-height: 1;
    font-size: inherit;
    text-decoration: none;
}

body.mpcirc-circle-page .mpcirc-pagination-info {
    min-width: 60px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* ===== ACCESSIBILITY BUTTON STYLES ===== */
body.mpcirc-circle-page .mpcirc-comment-avatar-btn,
body.mpcirc-circle-page .mpcirc-comment-author-name-btn {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

body.mpcirc-circle-page .mpcirc-comment-avatar-btn {
    border-radius: 50%;
    transition: opacity 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-comment-avatar-btn:hover {
    opacity: 0.8;
}

body.mpcirc-circle-page .mpcirc-comment-avatar-btn:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-comment-author-name-btn {
    color: #0f141a;
    font-weight: 600;
    font-size: 12px;
    text-align: left;
    transition: color 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-comment-author-name-btn:hover {
    background-color: inherit !important;
    color: #1da69a;
}

body.mpcirc-circle-page .mpcirc-comment-author-name-btn:focus-visible {
    border-radius: 2px;
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

/* ===== FORM STYLES ===== */
body.mpcirc-circle-page .mpcirc-form {
    width: 100%;
}

body.mpcirc-circle-page .mpcirc-form-section {
    margin-bottom: 24px;
    background: #fff;
}

body.mpcirc-circle-page .mpcirc-form-section h2 {
    margin-bottom: 24px;
    color: #0f141a;
    font-size: 20px;
    font-weight: 600;
}

body.mpcirc-circle-page .mpcirc-form-group {
    margin-bottom: 24px;
}

body.mpcirc-circle-page .mpcirc-form-group:last-child {
    margin-bottom: 0;
}

body.mpcirc-circle-page .mpcirc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

body.mpcirc-circle-page label.mpcirc-form-label {
    display: block;
    font-weight: 600;
}

body.mpcirc-circle-page .mpcirc-form-input,
body.mpcirc-circle-page .mpcirc-form-textarea,
body.mpcirc-circle-page .mpcirc-form-file {
    width: 100%;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    color: #374151;
    font-size: 14px;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-form-input:focus,
body.mpcirc-circle-page .mpcirc-form-textarea:focus,
body.mpcirc-circle-page .mpcirc-form-file:focus {
    border-color: #06429e;
    box-shadow: 0 0 0 3px rgba(6, 66, 158, 0.1);
}

body.mpcirc-circle-page .mpcirc-form-input::placeholder,
body.mpcirc-circle-page .mpcirc-form-textarea::placeholder {
    color: #9ca3af;
}

body.mpcirc-circle-page .mpcirc-form-textarea {
    min-height: 120px;
    line-height: 1.5;
    resize: vertical;
}

/* File input inherits standard input styling */

/* Select dropdown styling */
body.mpcirc-circle-page select[name="member-roles"] {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

body.mpcirc-circle-page select[name="member-roles"]:focus {
    border-color: #06429e;
    box-shadow: 0 0 0 3px rgba(6, 66, 158, 0.1);
}

body.mpcirc-circle-page select[name="member-roles"]:hover {
    border-color: #9ca3af;
}

/* Checkbox styling */
body.mpcirc-circle-page .mpcirc-form-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    margin-bottom: 0;
    accent-color: #06429e;
    cursor: pointer;
    vertical-align: middle;
}

body.mpcirc-circle-page .mpcirc-form-checkbox:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-form-group input[type="checkbox"] + label {
    display: inline;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
    vertical-align: middle;
}

/* Form validation styles */
body.mpcirc-circle-page .mpcirc-form-error {
    display: none;
    margin-left: 8px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 400;
}

body.mpcirc-circle-page .mpcirc-form-error.active {
    display: inline;
}

body.mpcirc-circle-page .mpcirc-form-input.error,
body.mpcirc-circle-page .mpcirc-form-textarea.error {
    border-color: #dc2626;
}

body.mpcirc-circle-page .mpcirc-form-input.error:focus,
body.mpcirc-circle-page .mpcirc-form-textarea.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

body.mpcirc-circle-page .mpcirc-form-checkbox.error {
    accent-color: #dc2626;
}

body.mpcirc-circle-page .mpcirc-form-checkbox.error:focus-visible {
    outline-color: #dc2626;
}

body.mpcirc-circle-page .mpcirc-radio-input.error {
    accent-color: #dc2626;
}

body.mpcirc-circle-page .mpcirc-radio-group .mpcirc-radio-input.error:focus-visible {
    outline-color: #dc2626;
}

/* Required field asterisk styling */
body.mpcirc-circle-page .mpcirc-form-required {
    color: #dc2626;
    font-weight: 500;
    margin-left: 4px;
}

/* Form group label for grouped elements like radio buttons */
body.mpcirc-circle-page .mpcirc-form-group-label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Member avatar styling */
body.mpcirc-circle-page .mpcirc-member-name-container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

body.mpcirc-circle-page .mpcirc-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Radio button styling */
body.mpcirc-circle-page .mpcirc-form-radio {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    margin-bottom: 0;
    accent-color: #06429e;
    cursor: pointer;
    vertical-align: middle;
}

body.mpcirc-circle-page .mpcirc-form-radio:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-form-group input[type="radio"] + label {
    display: inline;
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
    vertical-align: middle;
}

/* Submit button styling */
body.mpcirc-circle-page .mpcirc-form-submit,
body.mpcirc-circle-page input[type="submit"].mpcirc-form-submit,
body.mpcirc-circle-page button.mpcirc-form-submit {
    min-width: 160px !important;
    padding: 12px 24px !important;
    background: #1da69a !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

body.mpcirc-circle-page .mpcirc-form-submit:hover,
body.mpcirc-circle-page input[type="submit"].mpcirc-form-submit:hover,
body.mpcirc-circle-page button.mpcirc-form-submit:hover {
    background: #168a80 !important;
    box-shadow: 0 4px 12px rgba(29, 166, 154, 0.3) !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
    border: none !important;
}

body.mpcirc-circle-page .mpcirc-form-submit:active,
body.mpcirc-circle-page input[type="submit"].mpcirc-form-submit:active,
body.mpcirc-circle-page button.mpcirc-form-submit:active {
    box-shadow: 0 2px 6px rgba(29, 166, 154, 0.2) !important;
    transform: translateY(0) !important;
    background: #168a80 !important;
    color: #fff !important;
    border: none !important;
}

body.mpcirc-circle-page .mpcirc-form-submit:focus,
body.mpcirc-circle-page input[type="submit"].mpcirc-form-submit:focus,
body.mpcirc-circle-page button.mpcirc-form-submit:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(6, 66, 158, 0.3) !important;
    background: #1da69a !important;
    color: #fff !important;
    border: none !important;
}

body.mpcirc-circle-page .mpcirc-form-submit:focus-visible,
body.mpcirc-circle-page input[type="submit"].mpcirc-form-submit:focus-visible,
body.mpcirc-circle-page button.mpcirc-form-submit:focus-visible {
    outline: 2px solid #1da69a !important;
    outline-offset: 2px !important;
    background: #1da69a !important;
    color: #fff !important;
    border: none !important;
}

/* Radio group styling for clickable cards */
body.mpcirc-circle-page .mpcirc-radio-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-radio-group:hover {
    border-color: #06429e;
}

body.mpcirc-circle-page .mpcirc-radio-group:last-child {
    margin-bottom: 0;
}

body.mpcirc-circle-page .mpcirc-radio-content {
    flex: 1;
}

body.mpcirc-circle-page .mpcirc-radio-label {
    display: block;
    margin-bottom: 4px;
    color: #0f141a;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
}

body.mpcirc-circle-page .mpcirc-radio-sublabel {
    display: inline-block;
    margin: 0 !important;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

body.mpcirc-circle-page .mpcirc-radio-input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #06429e;
    cursor: pointer;
}

body.mpcirc-circle-page .mpcirc-radio-input:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

/* Active state when radio is selected */
body.mpcirc-circle-page .mpcirc-radio-group:has(input:checked) {
    border-color: #06429e;
}

/* Fieldset reset for accessibility without visual impact */
body.mpcirc-circle-page .mpcirc-form-section fieldset {
    margin: 0;
    padding: 0;
    border: none;
    min-width: 0;
}

body.mpcirc-circle-page .mpcirc-form-section legend {
    padding: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 960px) {
    body.mpcirc-circle-page .mpcirc-page-navigation ul li a {
        padding: 10px 32px;
    }

    body.mpcirc-circle-page .mpcirc-circles-grid {
        grid-template-columns: repeat(4, 1fr);
        column-gap: 16px;
        row-gap: 32px;
    }

    body.mpcirc-circle-page .mpcirc-circle-image {
        max-width: 180px;
        height: 180px;
    }

}

@media (max-width: 900px) {
    body.mpcirc-circle-page .mpcirc-page-navigation ul li a {
        padding: 10px 20px;
    }

}

@media (max-width: 800px) {
    /* Members filter responsive improvements for medium screens */
    body.mpcirc-circle-page .mpcirc-members-filter-list {
        gap: 24px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-link {
        padding: 10px 16px;
        font-size: 13px;
    }

}

@media (max-width: 700px) {
    /* Members filter improvements for smaller screens - wrap items */
    body.mpcirc-circle-page .mpcirc-members-filter {
        padding-bottom: 8px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-list {
        gap: 12px;
        flex-wrap: wrap;
        row-gap: 8px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-link {
        padding: 8px 12px;
        font-size: 12px;
        flex-shrink: 0;
        min-height: 36px;
        display: flex;
        align-items: center;
    }

}

/* ===== MEMBERS HEADER ===== */
/* Note: Members header now uses generic .mpcirc-page-header classes */

body.mpcirc-circle-page button.mpcirc-add-members-btn {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 8px;
    padding: 10px 16px;
    margin-top: -4px;
    background-color: #1da69a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

body.mpcirc-circle-page button.mpcirc-add-members-btn:hover {
    background-color: #168a80;
}

body.mpcirc-circle-page button.mpcirc-add-members-btn:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

/* ===== MEMBERS FILTER TABS ===== */
body.mpcirc-circle-page .mpcirc-members-filter {
    width: 100%;
    max-width: 100%;
    margin: 24px 0 ;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
}

/* More specific selector for members filter list */
body.mpcirc-circle-page .mpcirc-main-content .mpcirc-members-filter-list,
body.mpcirc-circle-page main .mpcirc-members-filter-list,
body.mpcirc-circle-page .mpcirc-members-filter .mpcirc-members-filter-list,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-members-filter-list {
    list-style: none;
    list-style-type: none;
    list-style-image: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
    box-sizing: border-box;
}

/* Specific targeting for members filter list items */
body.mpcirc-circle-page .mpcirc-main-content .mpcirc-members-filter-list li,
body.mpcirc-circle-page main .mpcirc-members-filter-list li,
body.mpcirc-circle-page .mpcirc-members-filter .mpcirc-members-filter-list li,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-members-filter-list li {
    list-style: none;
    list-style-type: none;
    list-style-image: none;
}

body.mpcirc-circle-page .mpcirc-members-filter-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #59738c;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 3px solid #c6c4c4;
    transition: color 0.2s ease, border-color 0.2s ease;
    position: relative;
}

body.mpcirc-circle-page .mpcirc-members-filter-link:hover {
    color: #374151;
    border-bottom-color: #797777;
}

body.mpcirc-circle-page .mpcirc-members-filter-link:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
    border-radius: 4px 4px 0 0;
}

body.mpcirc-circle-page .mpcirc-members-filter-active,
body.mpcirc-circle-page .mpcirc-members-filter-link[aria-selected="true"] {
    color: #374151;
    border-bottom-color: #797777;
}

body.mpcirc-circle-page .mpcirc-members-filter-active:hover,
body.mpcirc-circle-page .mpcirc-members-filter-link[aria-selected="true"]:hover {
    border-bottom-color: #797777;
}

/* ===== MEMBERS TABLE STYLES ===== */
body.mpcirc-circle-page .mpcirc-members-table-section {
    margin: 0 0 32px 0;
}

body.mpcirc-circle-page .mpcirc-members-table-container {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    position: relative;
    box-sizing: border-box;
}

body.mpcirc-circle-page .mpcirc-members-table,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    border-width: 0;
    font-size: 14px;
    table-layout: fixed;
    box-sizing: border-box;
}

body.mpcirc-circle-page .mpcirc-members-table th,
body.mpcirc-circle-page .mpcirc-members-table td,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table th,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table td {
    padding: 12px 16px;
    border: none !important;
    background-color: transparent !important;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

body.mpcirc-circle-page .mpcirc-members-table tbody tr:nth-child(odd) > td,
body.mpcirc-circle-page .mpcirc-members-table tbody tr:nth-child(odd) > th,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table tbody tr:nth-child(odd) > td,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table tbody tr:nth-child(odd) > th {
    background-color: transparent !important;
}

body.mpcirc-circle-page .mpcirc-members-table th,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table th {
    position: relative;
    background-color: #f9fafb !important;
    color: #0f141a;
    font-weight: 500;
}

body.mpcirc-circle-page .mpcirc-members-table thead tr,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table thead tr {
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

body.mpcirc-circle-page .mpcirc-members-table tbody tr,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table tbody tr {
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb;
}

body.mpcirc-circle-page .mpcirc-members-table tbody tr:last-child,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table tbody tr:last-child {
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb;
}

body.mpcirc-circle-page .mpcirc-members-table tbody tr:hover,
body.mpcirc-circle-page #mpcirc-main-content table.mpcirc-members-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Sortable headers */
body.mpcirc-circle-page .mpcirc-sortable-header {
    user-select: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-header-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.mpcirc-circle-page .mpcirc-sortable-header:hover {
    background-color: #f3f4f6;
}

body.mpcirc-circle-page .mpcirc-sortable-header:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
    border-radius: 4px;
}

body.mpcirc-circle-page .mpcirc-sort-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
    margin-left: 5px;
}

body.mpcirc-circle-page .mpcirc-sort-icon {
    display: none;
    width: 12px;
    height: 12px;
    transition: opacity 0.2s ease;
}

/* Default state - Name column shows asc, others show desc */
body.mpcirc-circle-page .mpcirc-sortable-header[aria-sort="none"][data-sort="name"] .mpcirc-sort-asc {
    display: block;
}

body.mpcirc-circle-page .mpcirc-sortable-header[aria-sort="none"]:not([data-sort="name"]) .mpcirc-sort-desc {
    display: block;
}

/* Active states - show only the relevant icon */
body.mpcirc-circle-page .mpcirc-sortable-header[aria-sort="ascending"] .mpcirc-sort-asc {
    display: block;
}

body.mpcirc-circle-page .mpcirc-sortable-header[aria-sort="descending"] .mpcirc-sort-desc {
    display: block;
}

/* Member role badges */
body.mpcirc-circle-page .mpcirc-member-role {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 28px;
    padding: 0 8px;
    background-color: #c6c4c4;
    border-radius: 14px;
    color: #0f141a;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Member status badges */
body.mpcirc-circle-page .mpcirc-member-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 28px;
    padding: 0 8px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

body.mpcirc-circle-page .mpcirc-status-active {
    background-color: #1da69a;
    color: #FFFFFF;
}

body.mpcirc-circle-page .mpcirc-status-banned {
    background-color: #dc2626;
    color: #FFFFFF;
}

body.mpcirc-circle-page .mpcirc-status-muted {
    background-color: #f3f4f6;
    color: #6b7280;
}

body.mpcirc-circle-page .mpcirc-status-deleted {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Member actions button */
body.mpcirc-circle-page .mpcirc-member-actions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background-color: rgba(198, 196, 196, 0.5);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-member-actions-btn:hover {
    background-color: rgba(198, 196, 196, 0.7);
}

body.mpcirc-circle-page .mpcirc-member-actions-btn:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-member-actions-btn img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

body.mpcirc-circle-page .mpcirc-member-actions-btn:hover img {
    opacity: 1;
}

/* Member profile links */
body.mpcirc-circle-page .mpcirc-member-profile-link {
    color: #06429e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: inline-block;
}

body.mpcirc-circle-page .mpcirc-member-profile-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

body.mpcirc-circle-page .mpcirc-member-profile-link:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== MEMBER ACTIONS ===== */
body.mpcirc-circle-page .mpcirc-member-actions-wrapper {
    position: relative;
    /* Ensure actions column doesn't expand for modal */
    overflow: visible;
    /* Center the action button in the cell */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Name column should have reasonable width constraint */
body.mpcirc-circle-page .mpcirc-members-table th:first-child,
body.mpcirc-circle-page .mpcirc-members-table td:first-child {
    width: 30%;
    max-width: 350px;
}

/* Actions column should have fixed width */
body.mpcirc-circle-page .mpcirc-members-table th:last-child,
body.mpcirc-circle-page .mpcirc-members-table td:last-child {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

/* Member action modal - positioned via JavaScript */
body.mpcirc-circle-page .mpcirc-member-modals-container {
    position: relative;
}

body.mpcirc-circle-page .mpcirc-member-action-modal {
    position: fixed;
    width: 330px;
    z-index: 1000;
}

body.mpcirc-circle-page .mpcirc-member-remove-form,
body.mpcirc-circle-page .mpcirc-member-ban-form,
body.mpcirc-circle-page .mpcirc-member-mute-form {
  right: 0;
  width: 350px;
}

body.mpcirc-circle-page .mpcirc-member-action-modal.active {
    display: block;
}

body.mpcirc-circle-page .mpcirc-member-action-modal p {
    margin: 0 0 12px 0;
    padding-right: 24px;
    color: #0f141a;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-member-action-buttons {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

body.mpcirc-circle-page .mpcirc-member-action-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

body.mpcirc-circle-page .mpcirc-member-action-btn,
body.mpcirc-circle-page a.mpcirc-member-action-btn,
body.mpcirc-circle-page button.mpcirc-member-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border-color: #c6c4c4;
    font-size: 16px;
    text-align: center;
    justify-content: center;
}

body.mpcirc-circle-page .mpcirc-member-action-btn::before,
body.mpcirc-circle-page button.mpcirc-member-action-btn::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Individual button icon styles using simple action key classes */
body.mpcirc-circle-page .mpcirc-member-action-btn.ban_member {
  --icon-normal: url('../images/ban-icon.svg');
  --icon-hover: url('../images/ban-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ban_member::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ban_member:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.remove_member {
  --icon-normal: url('../images/remove-icon.svg');
  --icon-hover: url('../images/remove-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.remove_member::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.remove_member:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.mute_member {
  --icon-normal: url('../images/mute-icon.svg');
  --icon-hover: url('../images/mute-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.mute_member::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.mute_member:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.unmute_member,
body.mpcirc-circle-page .mpcirc-member-action-btn.unmute_flagged_member {
  --icon-normal: url('../images/unmute-icon.svg');
  --icon-hover: url('../images/unmute-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.unmute_member::before,
body.mpcirc-circle-page .mpcirc-member-action-btn.unmute_flagged_member::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.unmute_member:hover::before,
body.mpcirc-circle-page .mpcirc-member-action-btn.unmute_flagged_member:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.unban_member {
  --icon-normal: url('../images/unban-icon.svg');
  --icon-hover: url('../images/unban-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.unban_member::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.unban_member:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ignore_report {
  --icon-normal: url('../images/ignore-icon.svg');
  --icon-hover: url('../images/ignore-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ignore_report::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ignore_report:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.mute_flagged_member {
  --icon-normal: url('../images/mute-icon.svg');
  --icon-hover: url('../images/mute-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.mute_flagged_member::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.mute_flagged_member:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ban_flagged_member {
  --icon-normal: url('../images/ban-icon.svg');
  --icon-hover: url('../images/ban-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ban_flagged_member::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ban_flagged_member:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.remove_flagged_content {
  --icon-normal: url('../images/remove-icon.svg');
  --icon-hover: url('../images/remove-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.remove_flagged_content::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.remove_flagged_content:hover::before {
  background-image: var(--icon-hover);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.view_posts {
  --icon-normal: url('../images/post-icon.svg');
  --icon-hover: url('../images/post-icon-white.svg');
}

body.mpcirc-circle-page .mpcirc-member-action-btn.view_posts::before {
  background-image: var(--icon-normal);
}

body.mpcirc-circle-page .mpcirc-member-action-btn.view_posts:hover::before {
  background-image: var(--icon-hover);
}

/* Danger buttons should always use white icons for better contrast */
body.mpcirc-circle-page .mpcirc-member-action-btn.mpcirc-modal-btn-danger::before {
  background-image: var(--icon-hover) !important;
}

/* Modal icon styles using red versions */
body.mpcirc-circle-page .mpcirc-action-form-icon.ban_member::after {
  background-image: url('../images/ban-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.remove_member::after {
  background-image: url('../images/remove-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.mute_member::after {
  background-image: url('../images/mute-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.unmute_member::after,
body.mpcirc-circle-page .mpcirc-action-form-icon.unmute_flagged_member::after {
  background-image: url('../images/unmute-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.unban_member::after {
  background-image: url('../images/unban-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.mute_flagged_member::after {
  background-image: url('../images/mute-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.ban_flagged_member::after {
  background-image: url('../images/ban-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.remove_flagged_content::after {
  background-image: url('../images/remove-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-action-form-icon.ignore_report::after {
  background-image: url('../images/ignore-icon-alt.svg');
}

/* Legacy - keeping for backward compatibility */
body.mpcirc-circle-page .mpcirc-member-mute-form .mpcirc-action-form-icon::after {
  background-image: url('../images/mute-icon-alt.svg');
}

body.mpcirc-circle-page .mpcirc-mute-member-text {
  margin: 0 0 16px 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
}

body.mpcirc-circle-page .mpcirc-mute-duration-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

body.mpcirc-circle-page .mpcirc-mute-duration-btn,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-mute-duration-btn,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-mute-duration-btn:focus {
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  color: #374151;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

body.mpcirc-circle-page .mpcirc-mute-duration-btn:hover,
body.mpcirc-circle-page .mpcirc-mute-duration-btn.selected,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-mute-duration-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-mute-duration-btn.selected {
  background: #1da69a;
  border-color: #1da69a;
  color: #fff;
}

/* View Posts button - light gray */
body.mpcirc-circle-page .mpcirc-member-action-view-posts {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

/* All member action buttons except Ban Member get green hover */
body.mpcirc-circle-page .mpcirc-member-action-view-posts:hover,
body.mpcirc-circle-page .mpcirc-member-action-view-profile:hover,
body.mpcirc-circle-page .mpcirc-member-action-view-profile:hover,
body.mpcirc-circle-page .mpcirc-member-action-mute:hover,
body.mpcirc-circle-page .mpcirc-member-action-remove:hover {
    background: #1da69a;
    border-color: #1da69a;
    color: #fff;
}

@media (max-width: 768px) {
    /* Typography adjustments for mobile */
    body.mpcirc-circle-page #mpcirc-site-wrapper h1 {
        margin-top: 20px;
        font-size: 32px;
    }

    body.mpcirc-circle-page #mpcirc-site-wrapper h2 {
        font-size: 16px;
    }

    body.mpcirc-circle-page .mpcirc-circles-section {
        margin-bottom: 32px;
    }

    body.mpcirc-circle-page .mpcirc-circles-title {
        margin-bottom: 16px;
        font-size: 20px;
    }

    body.mpcirc-circle-page .mpcirc-circles-grid {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 12px;
    }

    body.mpcirc-circle-page .mpcirc-circle-title {
        font-size: 13px;
    }

    body.mpcirc-circle-page .mpcirc-main-hero {
        margin-bottom: 15px;
    }

    body.mpcirc-circle-page .mpcirc-main-hero-heading {
        font-size: 36px;
    }

    /* Search and filter mobile styles */
    body.mpcirc-circle-page .mpcirc-search-and-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    body.mpcirc-circle-page .mpcirc-search-container {
        max-width: none;
    }

    body.mpcirc-circle-page .mpcirc-search-submit-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }

    body.mpcirc-circle-page select#filter {
        min-width: auto;
        width: 100%;
    }

    /* Remove side borders on table container for mobile */
    body.mpcirc-circle-page .mpcirc-members-table-container {
        border-right: none;
        border-left: none;
        border-radius: 0;
    }

    /* Page Navigation Mobile Styles */
    body.mpcirc-circle-page .mpcirc-page-navigation {
        padding: 12px;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation ul {
        flex-wrap: wrap;
        gap: 8px;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation ul li {
        flex: 1;
        min-width: calc(50% - 4px);
    }

    body.mpcirc-circle-page .mpcirc-page-navigation ul li a {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 60px;
        padding: 12px 8px;
        text-align: center;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation ul li a span:last-child {
        margin-top: 4px;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation-icon {
        width: 18px;
        height: 18px;
    }

    body.mpcirc-circle-page .mpcirc-comment-form-row .mpcirc-comment-form-avatar,
body.mpcirc-circle-page .mpcirc-post-form-row .mpcirc-post-form-avatar {
        margin-top: 0;
    }

    body.mpcirc-circle-page .mpcirc-guidelines-list-content {
        padding: 15px;
        font-size: 13px;
    }

    /* Cards mobile styles */
    body.mpcirc-circle-page .mpcirc-latest-posts {
        gap: 16px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post {
        border-radius: 8px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post-header {
        padding: 12px 16px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post-content {
        padding: 16px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post-footer {
        padding: 12px 16px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post-comments {
        padding: 0 16px 16px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post-author img {
        width: 36px;
        height: 36px;
    }

    body.mpcirc-circle-page .mpcirc-comment-avatar {
        width: 28px;
        height: 28px;
    }

    /* Pagination mobile styles */
    body.mpcirc-circle-page .mpcirc-pagination {
        gap: 12px;
        margin: 24px 0;
        padding: 16px;
    }

    body.mpcirc-circle-page .mpcirc-pagination-btn {
        width: 36px;
        height: 36px;
        padding: 0 !important;
    }

    body.mpcirc-circle-page .mpcirc-pagination-btn svg {
        width: 18px;
        height: 18px;
    }

    body.mpcirc-circle-page .mpcirc-pagination-info {
        min-width: 50px;
        font-size: 13px;
    }

    /* Form responsive adjustments */
    body.mpcirc-circle-page .mpcirc-form-section {
        margin-bottom: 16px;
    }

    body.mpcirc-circle-page .mpcirc-form-section h2 {
        margin-bottom: 20px;
        font-size: 18px;
    }

    body.mpcirc-circle-page .mpcirc-form-group {
        margin-bottom: 20px;
    }

    body.mpcirc-circle-page .mpcirc-form-submit {
        width: 100%;
        padding: 16px;
    }

    /* Footer responsive adjustments */
    body.mpcirc-circle-page #mpcirc-footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    body.mpcirc-circle-page .mpcirc-footer-nav ul {
        flex-direction: column;
        gap: 10px;
    }

    body.mpcirc-circle-page .mpcirc-footer-nav ul li a {
        padding: 10px;
    }

    /* Emoji picker responsive adjustments */
    body.mpcirc-circle-page .mpcirc-modern-emoji-picker {
        --num-columns: 6;
        --emoji-size: 1.5rem;
        --category-emoji-size: 1rem;
    }

}

/* Medium devices (tablets, between 481px and 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    /* Members table tablet improvements */
    body.mpcirc-circle-page .mpcirc-members-table-container {
        margin: 0;
        border-right: none;
        border-left: none;
        border-radius: 0;
    }

    body.mpcirc-circle-page .mpcirc-members-table {
        min-width: 100%;
        table-layout: auto;
    }

    /* Hide Joined column on tablet to save space, keep Recent Activity */
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(3),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(3) {
        display: none;
    }

    /* Make Actions column narrower on tablets */
    body.mpcirc-circle-page .mpcirc-members-table th:last-child,
    body.mpcirc-circle-page .mpcirc-members-table td:last-child {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }

    /* Note: Header content styling now handled by generic .mpcirc-page-header-content */

    body.mpcirc-circle-page .mpcirc-add-members-btn {
        padding: 10px 20px;
        font-size: 16px;
    }

    /* Members filter tablet improvements */
    body.mpcirc-circle-page .mpcirc-members-filter {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-list {
        gap: 18px;
        padding-right: 20px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-link {
        padding: 9px 15px;
        font-size: 13px;
        min-height: 42px;
    }

}

/* Extra small devices (portrait phones, less than 480px) */
@media (max-width: 480px) {
    body.mpcirc-circle-page .mpcirc-main-hero-heading {
        font-size: 28px;
    }

    body.mpcirc-circle-page button.mpcirc-add-members-btn {
        align-self: flex-start;
        margin-top: 0;
        padding: 12px 16px;
        text-align: left;
        justify-content: flex-start;
    }

    /* Members table extreme mobile */
    body.mpcirc-circle-page .mpcirc-members-table-container {
        margin: 0;
    }

    /* Limit Role/Status column width on mobile */
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(2),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(2) {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }

    /* Hide Joined column (keep it hidden from tablet view) */
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(3),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(3) {
        display: none;
    }

    /* Hide Recent Activity column on very small screens */
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(4),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(4) {
        display: none;
    }

    /* Make actions column narrower */
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(5),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(5) {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        padding: 8px 8px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-list {
        gap: 12px;
        /* Ensure better scrolling on small screens */
        padding-right: 28px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-link {
        padding: 8px 14px;
        font-size: 12px;
        min-height: 40px; /* Slightly smaller for mobile */
        /* Better visual hierarchy */
        font-weight: 600;
    }

    /* Member action modal small mobile improvements */
    body.mpcirc-circle-page .mpcirc-member-action-modal {
        /* Ensure proper sizing on very small screens */
        min-width: 240px;
    }

    body.mpcirc-circle-page .mpcirc-member-action-btn {
        padding: 14px 16px; /* Even larger touch targets */
        font-size: 16px;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation ul li {
        min-width: 100%;
        margin-bottom: 4px;
    }

    body.mpcirc-circle-page .mpcirc-circles-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 10px;
    }

    body.mpcirc-circle-page .mpcirc-circle-image {
        max-width: 160px;
        height: 160px;
    }

    body.mpcirc-circle-page .mpcirc-circle-title {
        font-size: 12px;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation ul li a {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        min-height: 50px;
        gap: 12px;
        padding: 14px 16px;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation ul li a span:last-child {
        margin-top: 0;
    }

    body.mpcirc-circle-page .mpcirc-page-navigation-icon {
        width: 20px;
        height: 20px;
    }

    body.mpcirc-circle-page .mpcirc-form-section h2 {
        margin-bottom: 16px;
        font-size: 16px;
    }

    body.mpcirc-circle-page .mpcirc-form-group {
        margin-bottom: 16px;
    }

    /* Emoji picker responsive adjustments */
    body.mpcirc-circle-page .mpcirc-modern-emoji-picker {
        --num-columns: 5;
        --emoji-size: 1.4rem;
        --category-emoji-size: 0.9rem;
    }

}

@media (min-width: 576px) {
    body.mpcirc-circle-page .mpcirc-header-logo img {
        width: 150px;
        height: auto;
    }

}

@media (min-width: 768px) {
    body.mpcirc-circle-page .mpcirc-mobile-nav-menu {
        display: none;
    }

    /* Show all table columns on desktop */
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(3),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(3),
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(4),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(4) {
        display: table-cell !important;
    }

    /* Reset table layout for desktop */
    body.mpcirc-circle-page .mpcirc-members-table {
        table-layout: fixed;
    }

    /* Reset table container margins on desktop */
    body.mpcirc-circle-page .mpcirc-members-table-container {
        margin: 0;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }

    body.mpcirc-circle-page .mpcirc-search-and-filter {
        flex-direction: row;
        gap: 16px;
    }

    body.mpcirc-circle-page .mpcirc-main-content {
        padding: 16px 20px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post-header {
        gap: 16px;
    }

    body.mpcirc-circle-page .mpcirc-latest-post-author img {
        width: 40px;
        height: 40px;
    }

    body.mpcirc-circle-page .mpcirc-comment-form-row {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    /* Keep post creation form top-aligned on mobile */
    body.mpcirc-circle-page .mpcirc-post-form-row {
        align-items: flex-start;
    }

    body.mpcirc-circle-page .mpcirc-comment-form-input,
body.mpcirc-circle-page .mpcirc-post-form-input {
        padding: 16px 20px;
        font-size: 16px;
    }

    /* Textarea specific mobile styles */
    body.mpcirc-circle-page textarea.mpcirc-post-form-input {
        align-items: flex-start;
        min-height: 80px;
    }

    body.mpcirc-circle-page .mpcirc-comment-form-avatar {
        width: 40px;
        height: 40px;
    }

    /* Members table responsive styles */
    body.mpcirc-circle-page .mpcirc-members-table-container {
        margin: 0 -16px; /* Extend to screen edges on mobile */
        border-right: none;
        border-left: none;
        border-radius: 0;
        font-size: 12px;
    }

    body.mpcirc-circle-page .mpcirc-members-table {
        min-width: 100%;
        table-layout: auto;
    }

    body.mpcirc-circle-page .mpcirc-members-table th,
body.mpcirc-circle-page .mpcirc-members-table td {
        padding: 12px;
    }

    /* First column (Name) should be sticky on mobile */
    body.mpcirc-circle-page .mpcirc-members-table th:first-child,
body.mpcirc-circle-page .mpcirc-members-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        min-width: 120px;
        background: inherit;
    }

    body.mpcirc-circle-page .mpcirc-members-table th:first-child {
        background: #f9fafb;
    }

    body.mpcirc-circle-page .mpcirc-members-table tbody tr:hover td:first-child {
        background-color: #f9fafb;
    }

    body.mpcirc-circle-page .mpcirc-header-content {
        gap: 4px;
    }

    body.mpcirc-circle-page .mpcirc-sort-icon {
        width: 10px;
        height: 10px;
    }

    body.mpcirc-circle-page .mpcirc-member-actions-btn {
        width: 24px;
        height: 24px;
    }

    body.mpcirc-circle-page .mpcirc-member-actions-btn img {
        width: 14px;
        height: 14px;
    }

    /* Member action modal mobile improvements */
    body.mpcirc-circle-page .mpcirc-member-action-modal {
        /* Better mobile styling */
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
        border-radius: 12px;
        /* Smaller width on mobile */
        max-width: 330px;
    }

    body.mpcirc-circle-page .mpcirc-member-action-modal p {
        font-size: 13px;
        padding-right: 28px; /* More space for close button */
    }

    body.mpcirc-circle-page .mpcirc-member-action-buttons {
        gap: 6px; /* Tighter spacing on mobile */
    }

    body.mpcirc-circle-page .mpcirc-member-action-btn {
        padding: 12px 16px; /* Larger touch targets */
        font-size: 14px;
        min-height: 44px; /* iOS minimum touch target */
    }

    body.mpcirc-circle-page .mpcirc-member-action-btn::before,
body.mpcirc-circle-page button.mpcirc-member-action-btn::before {
        width: 16px;
        height: 16px;
    }

    /* On 768px and below, hide the Joined column to save space */
    body.mpcirc-circle-page .mpcirc-members-table th:nth-child(3),
    body.mpcirc-circle-page .mpcirc-members-table td:nth-child(3) {
        display: none;
    }

    /* Adjust role column */
    body.mpcirc-circle-page .mpcirc-member-role {
        font-size: 11px;
        padding: 2px 6px;
    }

    body.mpcirc-circle-page .mpcirc-add-members-btn {
        align-self: flex-start;
        margin-top: 6px;
        padding: 10px 16px;
        font-size: 17px;
    }

    /* Members filter responsive styles */
    body.mpcirc-circle-page .mpcirc-members-filter {
        margin: 16px 0;
        border-bottom: 1px solid #e5e7eb;
        position: relative;
        /* Extend to edges like table */
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-list {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        gap: 20px;
        padding-bottom: 2px; /* Space for focus outline */
        /* Ensure proper scroll behavior */
        scroll-behavior: smooth;
        /* Add padding for the gradient fade */
        padding-right: 24px;
    }

    body.mpcirc-circle-page .mpcirc-members-filter-list::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    body.mpcirc-circle-page .mpcirc-members-filter-link {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0; /* Prevent tabs from shrinking */
        min-width: fit-content;
        /* Better touch target */
        min-height: 44px;
        display: flex;
        align-items: center;
        /* Improve tap area */
        position: relative;
    }

    /* Improved scroll fade indicator */
    body.mpcirc-circle-page .mpcirc-members-filter::after {
        content: '';
        position: absolute;
        right: 16px;
        top: 0;
        bottom: 1px;
        width: 24px;
        background: linear-gradient(to left, #ffffff 100%, rgba(255, 255, 255, 0.8) 50%, transparent 0%);
        pointer-events: none;
        z-index: 2;
    }

}

/* ===== NON-MEMBER JOIN circle STYLES ===== */
body.mpcirc-circle-page .mpcirc-non-member-join-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 64px 24px;
    background-color: #def3f1;
    border-radius: 8px;
    text-align: center;
}

body.mpcirc-circle-page #mpcirc-site-wrapper .mpcirc-non-member-join-circle h2 {
    margin: 0 0 16px 0;
    color: #000;
    font-size: 26px;
    font-weight: 400;
}

body.mpcirc-circle-page .mpcirc-non-member-join-circle.mpcirc-access-restricted {
    background-color: #cecece70;
}

body.mpcirc-circle-page .mpcirc-join-circle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 12px 24px;
    background-color: #1da69a;
    border: 1px solid #1da69a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-join-circle-btn:hover {
    background-color: #158c82;
    border-color: #158c82;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(29, 166, 154, 0.2);
    color: #ffffff;
}

body.mpcirc-circle-page .mpcirc-join-circle-btn:focus {
    outline: 2px solid #1da69a;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-join-circle-btn:focus-visible {
    outline: 2px solid #1da69a;
    outline-offset: 2px;
}

body.mpcirc-circle-page .mpcirc-join-circle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(29, 166, 154, 0.2);
}

/* ===== LEAVE circle BUTTON STYLES ===== */
body.mpcirc-circle-page .mpcirc-leave-circle-btn,
body.mpcirc-circle-page button.mpcirc-leave-circle-btn,
body.mpcirc-circle-page input[type="button"].mpcirc-leave-circle-btn,
body.mpcirc-circle-page input[type="submit"].mpcirc-leave-circle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 160px !important;
    padding: 12px 24px !important;
    background-color: #dc2626 !important;
    border: 1px solid #dc2626 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.mpcirc-circle-page .mpcirc-leave-circle-btn:hover,
body.mpcirc-circle-page button.mpcirc-leave-circle-btn:hover,
body.mpcirc-circle-page input[type="button"].mpcirc-leave-circle-btn:hover,
body.mpcirc-circle-page input[type="submit"].mpcirc-leave-circle-btn:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2) !important;
    color: #ffffff !important;
}

body.mpcirc-circle-page .mpcirc-leave-circle-btn:focus,
body.mpcirc-circle-page button.mpcirc-leave-circle-btn:focus,
body.mpcirc-circle-page input[type="button"].mpcirc-leave-circle-btn:focus,
body.mpcirc-circle-page input[type="submit"].mpcirc-leave-circle-btn:focus {
    outline: 2px solid #dc2626 !important;
    outline-offset: 2px !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

body.mpcirc-circle-page .mpcirc-leave-circle-btn:focus-visible,
body.mpcirc-circle-page button.mpcirc-leave-circle-btn:focus-visible,
body.mpcirc-circle-page input[type="button"].mpcirc-leave-circle-btn:focus-visible,
body.mpcirc-circle-page input[type="submit"].mpcirc-leave-circle-btn:focus-visible {
    outline: 2px solid #dc2626 !important;
    outline-offset: 2px !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

body.mpcirc-circle-page .mpcirc-leave-circle-btn:active,
body.mpcirc-circle-page button.mpcirc-leave-circle-btn:active,
body.mpcirc-circle-page input[type="button"].mpcirc-leave-circle-btn:active,
body.mpcirc-circle-page input[type="submit"].mpcirc-leave-circle-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2) !important;
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

/* ===== SETTINGS FORM STYLES ===== */
body.mpcirc-circle-page .mpcirc-settings-form .mpcirc-form-submit {
    position: relative;
    min-width: 140px;
}

body.mpcirc-circle-page .mpcirc-settings-form .mpcirc-submit-text,
body.mpcirc-circle-page .mpcirc-settings-form .mpcirc-submit-loading {
    display: inline-block;
    transition: opacity 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-settings-form .mpcirc-submit-loading {
    opacity: 0.8;
}

body.mpcirc-circle-page .mpcirc-settings-form .mpcirc-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

body.mpcirc-circle-page .mpcirc-settings-form .mpcirc-form-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}

body.mpcirc-circle-page .mpcirc-form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-form-message.mpcirc-message-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

body.mpcirc-circle-page .mpcirc-form-message.mpcirc-message-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

body.mpcirc-circle-page .mpcirc-form-message:empty {
    display: none;
}

/* Generic Confirmation Modal */
body.mpcirc-circle-page .mpcirc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.mpcirc-circle-page .mpcirc-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    margin: 20px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

body.mpcirc-circle-page .mpcirc-modal-overlay.active .mpcirc-modal {
    transform: scale(1);
}

body.mpcirc-circle-page .mpcirc-modal-header {
    padding: 20px 20px 0;
}

body.mpcirc-circle-page .mpcirc-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

body.mpcirc-circle-page .mpcirc-modal-body {
    padding: 20px;
    color: #666;
    line-height: 1.5;
}

body.mpcirc-circle-page .mpcirc-modal-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

body.mpcirc-circle-page .mpcirc-modal-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

body.mpcirc-circle-page a.mpcirc-modal-btn.mpcirc-link-btn.view_post {
    font-size: 16px;
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ignore_report:focus {
    background-color: #fff !important;
    border-color: #d9d9d9 !important;
    color: #374151 !important;
}

body.mpcirc-circle-page .mpcirc-member-action-btn.ignore_report:hover {
    background-color: #1da69a !important;
    border-color: #1da69a !important;
    color: #fff !important;
}

body.mpcirc-circle-page .mpcirc-modal-btn-secondary {
    background-color: #f5f5f5;
    color: #666;
}

body.mpcirc-circle-page .mpcirc-modal-btn-secondary:hover {
    background-color: #e5e5e5;
    color: #666;
}

body.mpcirc-circle-page .mpcirc-modal-btn-danger,
body.mpcirc-circle-page .mpcirc-modal-btn-danger:focus {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

body.mpcirc-circle-page .mpcirc-modal-btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

body.mpcirc-circle-page .mpcirc-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

body.mpcirc-circle-page .mpcirc-comment-action-button-edit:focus {
    background-color: inherit !important;
    color: inherit !important;
}

/* Loading state for modal buttons */
body.mpcirc-circle-page .mpcirc-modal-btn.loading {
    position: relative;
    color: transparent;
}

body.mpcirc-circle-page .mpcirc-modal-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: mpcirc-spin 1s linear infinite;
}

@keyframes mpcirc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and Error Messages */
body.mpcirc-circle-page .mpcirc-form-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

body.mpcirc-circle-page .mpcirc-form-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* ===== MENTION POPUP STYLES ===== */
body.mpcirc-circle-page .mpcirc-mention-popup {
    display: none;
    position: absolute;
    width: 330px;
    max-height: 200px;
    z-index: 10000;
    padding: 0;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

body.mpcirc-circle-page .mpcirc-mention-popup.active {
    display: block;
}

body.mpcirc-circle-page .mpcirc-mention-popup-content {
    max-height: 200px;
    overflow-y: auto;
}

body.mpcirc-circle-page .mpcirc-mention-user-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

body.mpcirc-circle-page .mpcirc-mention-user-item:last-child {
    border-bottom: none;
}

body.mpcirc-circle-page .mpcirc-mention-user-item:hover,
body.mpcirc-circle-page .mpcirc-mention-user-item.selected {
    background-color: #f9fafb;
}

body.mpcirc-circle-page .mpcirc-mention-user-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    margin-right: 12px;
}

body.mpcirc-circle-page .mpcirc-mention-user-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    line-height: 1.25;
}

body.mpcirc-circle-page .mpcirc-mention-no-results {
    padding: 12px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

/* ===== POST FORM SUBMITTING STATE ===== */
body.mpcirc-circle-page .mpcirc-post-form.mpcirc-post-submitting {
    position: relative;
    pointer-events: none;
}

/* ===== LOADING SPINNER STYLES ===== */
body.mpcirc-circle-page .mpcirc-loading-spinner {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

body.mpcirc-circle-page .mpcirc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #1da69a;
    border-radius: 50%;
    animation: mpcirc-spinner-rotate 1s linear infinite;
}

@keyframes mpcirc-spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FORM MESSAGE STYLES (POSITIONED WITHIN FORM) ===== */
body.mpcirc-circle-page .mpcirc-post-form .mpcirc-form-message {
    position: absolute;
    bottom: 40%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    margin: 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 200px;
}

/* ===== SKELETON UI STYLES ===== */
body.mpcirc-circle-page .mpcirc-posts-skeleton {
    pointer-events: none;
}

body.mpcirc-circle-page .mpcirc-skeleton-post {
    animation: mpcirc-skeleton-fade 2s ease-in-out infinite;
}

body.mpcirc-circle-page .mpcirc-skeleton-avatar {
    width: 40px;
    height: 40px;
    background-color: #e2e8f0;
    border-radius: 50%;
    flex-shrink: 0;
}

body.mpcirc-circle-page .mpcirc-skeleton-avatar--small {
    width: 32px;
    height: 32px;
}

body.mpcirc-circle-page .mpcirc-skeleton-text {
    background-color: #e2e8f0;
    border-radius: 4px;
    height: 12px;
    margin-bottom: 4px;
}

body.mpcirc-circle-page .mpcirc-skeleton-name {
    width: 80px;
    height: 14px;
    margin-bottom: 6px;
}

body.mpcirc-circle-page .mpcirc-skeleton-role {
    width: 60px;
    height: 10px;
}

body.mpcirc-circle-page .mpcirc-skeleton-time {
    width: 50px;
    height: 10px;
}

body.mpcirc-circle-page .mpcirc-skeleton-line {
    width: 100%;
    height: 14px;
    margin-bottom: 8px;
}

body.mpcirc-circle-page .mpcirc-skeleton-line--short {
    width: 70%;
}

body.mpcirc-circle-page .mpcirc-skeleton-icon {
    width: 32px;
    height: 32px;
    background-color: #e2e8f0;
    border-radius: 50%;
    flex-shrink: 0;
}

body.mpcirc-circle-page .mpcirc-skeleton-count {
    width: 20px;
    height: 12px;
}

body.mpcirc-circle-page .mpcirc-skeleton-input {
    flex: 1;
    height: 20px;
    background-color: #e2e8f0;
    border-radius: 8px;
    margin: 0 8px;
}

@keyframes mpcirc-skeleton-fade {
    0% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.4;
    }
}

/* ===== READ MORE FUNCTIONALITY ===== */
/* Truncated content state - shows only first few lines */
body.mpcirc-circle-page .mpcirc-post-content-text.mpcirc-content-truncated {
    position: relative;
    max-height: 4.5em; /* Approximately 3 lines of text */
    overflow: hidden;
    line-height: 1.5;
}

/* Add fade effect at the bottom when truncated */
body.mpcirc-circle-page .mpcirc-post-content-text.mpcirc-content-truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

/* Expanded content state - shows full content */
body.mpcirc-circle-page .mpcirc-post-content-text.mpcirc-content-expanded {
    max-height: none;
    overflow: visible;
}

/* Remove fade effect when expanded */
body.mpcirc-circle-page .mpcirc-post-content-text.mpcirc-content-expanded::after {
    display: none;
}

/* Read more toggle link styling */
body.mpcirc-circle-page .mpcirc-read-more-toggle {
    display: inline-block;
    color: #007cba;
    text-decoration: underline;
    font-size: 14px;
    font-weight: inherit;
    margin-top: 0.5em;
    cursor: pointer;
    transition: color 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-read-more-toggle:hover {
    color: #005a87;
    text-decoration: none;
}

body.mpcirc-circle-page .mpcirc-read-more-toggle:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Ensure proper spacing around content */
body.mpcirc-circle-page .mpcirc-post-content-text p {
    margin-bottom: 0;
}

/* ===== MODERATION QUEUE STYLES ===== */
/* Unique styles for the moderation queue page - can be used in both frontend and wp-admin */

/* Generic Page Header - used by Members, Moderation, Settings, and Rules pages */
body.mpcirc-circle-page .mpcirc-page-header {
  margin: 0 0 24px 0;
}

body.mpcirc-circle-page .mpcirc-page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

body.mpcirc-circle-page .mpcirc-page-header h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 36px;
  line-height: 1.5;
  color: #000;
  font-weight: 400;
}

body.mpcirc-circle-page .mpcirc-page-header p {
  margin-bottom: 20px;
  color: #59738c;
  line-height: 1.5;
  font-size: 16px;
}

/* Moderation Filter - matches members filter style */
body.mpcirc-circle-page .mpcirc-moderation-filter {
    margin: 24px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* More specific selector for moderation filter list */
body.mpcirc-circle-page .mpcirc-main-content .mpcirc-moderation-filter-list,
body.mpcirc-circle-page main .mpcirc-moderation-filter-list,
body.mpcirc-circle-page .mpcirc-moderation-filter .mpcirc-moderation-filter-list,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-moderation-filter-list {
    list-style: none;
    list-style-type: none;
    list-style-image: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}

/* Specific targeting for moderation filter list items */
body.mpcirc-circle-page .mpcirc-main-content .mpcirc-moderation-filter-list li,
body.mpcirc-circle-page main .mpcirc-moderation-filter-list li,
body.mpcirc-circle-page .mpcirc-moderation-filter .mpcirc-moderation-filter-list li,
body.mpcirc-circle-page #mpcirc-main-content .mpcirc-moderation-filter-list li {
    list-style: none;
    list-style-type: none;
    list-style-image: none;
}

body.mpcirc-circle-page .mpcirc-moderation-filter-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #59738c;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 3px solid #c6c4c4;
    transition: color 0.2s ease, border-color 0.2s ease;
    position: relative;
}

body.mpcirc-circle-page .mpcirc-moderation-filter-link:hover {
    color: #374151;
    border-bottom-color: #797777;
}

body.mpcirc-circle-page .mpcirc-moderation-filter-link:focus-visible {
    outline: 2px solid #06429e;
    outline-offset: 2px;
    border-radius: 4px 4px 0 0;
}

body.mpcirc-circle-page .mpcirc-moderation-filter-active,
body.mpcirc-circle-page .mpcirc-moderation-filter-link[aria-selected="true"] {
    color: #374151;
    border-bottom-color: #797777;
}

body.mpcirc-circle-page .mpcirc-moderation-filter-active:hover,
body.mpcirc-circle-page .mpcirc-moderation-filter-link[aria-selected="true"]:hover {
    border-bottom-color: #797777;
}

/* Moderation Queue Section */
body.mpcirc-circle-page .mpcirc-moderation-queue-section {
    background: #ffffff;
    min-height: 60vh;
}

body.mpcirc-circle-page .mpcirc-moderation-queue-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Moderation Items */
body.mpcirc-circle-page .mpcirc-moderation-item,
body.mpcirc-circle-page .mpcirc-no-results {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-no-results {
    padding-bottom: 0;
    font-size: 14px;
    padding-top: 20px;
    margin-top: 1rem;
}

body.mpcirc-circle-page .mpcirc-no-results p {
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 14px;
}

body.mpcirc-circle-page .mpcirc-moderation-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.mpcirc-circle-page .mpcirc-moderation-item-content {
    flex: 1;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

body.mpcirc-circle-page .mpcirc-moderation-item-avatar {
    flex-shrink: 0;
}

body.mpcirc-circle-page .mpcirc-moderation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

body.mpcirc-circle-page .mpcirc-moderation-item-details {
    flex: 1;
    min-width: 0;
}

body.mpcirc-circle-page .mpcirc-moderation-item-text {
    margin-bottom: 1rem;
}

body.mpcirc-circle-page .mpcirc-moderation-content {
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

body.mpcirc-circle-page .mpcirc-moderation-timestamp {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

body.mpcirc-circle-page .mpcirc-moderation-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

body.mpcirc-circle-page .mpcirc-moderation-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.775rem;
}

body.mpcirc-circle-page .mpcirc-moderation-meta-label {
    color: #6b7280;
    font-weight: 500;
    min-width: 120px;
}

body.mpcirc-circle-page .mpcirc-moderation-meta-value {
    color: #374151;
    font-weight: 400;
}

body.mpcirc-circle-page .mpcirc-moderation-reason {
    color: #dc2626;
    font-weight: 500;
}

/* Moderation Actions */
body.mpcirc-circle-page .mpcirc-moderation-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Moderation Modals */
body.mpcirc-circle-page .mpcirc-moderation-modals-container {
    position: relative;
}

/* ===== ADD MEMBERS MODAL ===== */
body.mpcirc-circle-page .mpcirc-add-members-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 460px;
    max-height: 520px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0px 20px 24px -4px rgba(10, 13, 18, 0.1), 0px 8px 8px -4px rgba(10, 13, 18, 0.04);
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

body.mpcirc-circle-page .mpcirc-add-members-modal-header {
    padding: 20px 16px 0;
    text-align: center;
}

body.mpcirc-circle-page .mpcirc-add-members-modal-header h3 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 28px;
    color: #181D27;
}

body.mpcirc-circle-page .mpcirc-add-members-modal-content {
    padding: 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    overflow: hidden;
}

body.mpcirc-circle-page .mpcirc-add-members-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

body.mpcirc-circle-page .mpcirc-add-members-search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.mpcirc-circle-page .mpcirc-add-members-search-input {
    width: 100%;
    height: 41px;
    padding: 10px 14px;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    box-shadow: 0px 1px 2px rgba(10, 13, 18, 0.05);
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 21px;
    color: #717680;
    box-sizing: border-box;
}

body.mpcirc-circle-page .mpcirc-add-members-search-input::placeholder {
    color: #717680;
}

body.mpcirc-circle-page .mpcirc-add-members-search-hint {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 140%;
    text-align: center;
    color: #535862;
    margin-bottom: 20px;
}

body.mpcirc-circle-page .mpcirc-add-members-list-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: 250px;
}

body.mpcirc-circle-page .mpcirc-add-members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.mpcirc-circle-page .mpcirc-add-members-member-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    height: 40px;
}

body.mpcirc-circle-page .mpcirc-add-members-member-content {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
}

body.mpcirc-circle-page .mpcirc-add-members-checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

body.mpcirc-circle-page .mpcirc-add-members-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #1DA69A;
    border-radius: 4px;
    background: #F9F5FF;
    cursor: pointer;
}

body.mpcirc-circle-page .mpcirc-add-members-checkbox:checked {
    background: #1DA69A;
    position: relative;
}

body.mpcirc-circle-page .mpcirc-add-members-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 12.5%;
    right: 12.5%;
    top: 12.5%;
    bottom: 12.5%;
    border: 1.6666px solid #1DA69A;
    border-radius: 2px;
}

body.mpcirc-circle-page .mpcirc-add-members-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

body.mpcirc-circle-page .mpcirc-add-members-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.mpcirc-circle-page .mpcirc-add-members-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #A2A8CD;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

body.mpcirc-circle-page .mpcirc-add-members-member-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

body.mpcirc-circle-page .mpcirc-add-members-member-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Member Label for Existing Members */
body.mpcirc-circle-page .mpcirc-add-members-member-label {
    display: inline-block;
    padding: 2px 8px;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    text-transform: lowercase;
    letter-spacing: 0;
    line-height: 1.2;
}

/* Greyed out state for existing members */
body.mpcirc-circle-page .mpcirc-member-existing {
    opacity: 0.6;
    pointer-events: none;
}

body.mpcirc-circle-page .mpcirc-member-existing .mpcirc-add-members-member-name,
body.mpcirc-circle-page .mpcirc-member-existing .mpcirc-add-members-member-email {
    color: #9ca3af;
}

body.mpcirc-circle-page .mpcirc-member-existing .mpcirc-add-members-avatar-placeholder {
    background: #e5e7eb;
    color: #9ca3af;
}

body.mpcirc-circle-page .mpcirc-add-members-member-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #414651;
}

body.mpcirc-circle-page .mpcirc-add-members-member-email {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #535862;
}

body.mpcirc-circle-page .mpcirc-add-members-no-members {
    text-align: center;
    color: #535862;
    font-style: italic;
    padding: 20px;
}

body.mpcirc-circle-page .mpcirc-add-members-form-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
    margin-top: 10px;
    border-top: 1px solid #E9EAEB;
    flex-shrink: 0;
}

body.mpcirc-circle-page .mpcirc-add-members-confirm-btn,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-add-members-confirm-btn {
    width: 100%;
    height: 40px;
    background: #1DA69A;
    border: 1px solid #1DA69A;
    border-radius: 8px;
    color: #FFFFFF;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 17px;
    line-height: 20px;
    cursor: pointer;
    box-shadow: 0px 1px 2px rgba(10, 13, 18, 0.05);
}

body.mpcirc-circle-page .mpcirc-add-members-confirm-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-add-members-confirm-btn:hover {
    background: #1a8f7a;
    border-color: #1a8f7a;
}

body.mpcirc-circle-page .mpcirc-add-members-cancel-btn,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-add-members-cancel-btn {
    width: 100%;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    color: #414651;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 17px;
    line-height: 20px;
    cursor: pointer;
    box-shadow: 0px 1px 2px rgba(10, 13, 18, 0.05);
}

body.mpcirc-circle-page .mpcirc-add-members-cancel-btn:hover,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-add-members-cancel-btn:hover {
    background: #f5f5f5;
    border-color: #c5c7ca;
}

body.mpcirc-circle-page .mpcirc-add-members-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

body.mpcirc-circle-page .mpcirc-add-members-error-state p {
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
    color: #dc2626;
}

body.mpcirc-circle-page .mpcirc-add-members-retry-btn {
    background-color: #1DA69A;
    color: #FFFFFF;
    border: 1px solid #1DA69A;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-add-members-retry-btn:hover {
    background-color: #0d9488;
    border-color: #0d9488;
}

/* Confirm button disabled state */
body.mpcirc-circle-page .mpcirc-trigger-add-members:disabled,
body.mpcirc-circle-page .mpcirc-trigger-add-members.disabled {
    background-color: #e5e7eb;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

body.mpcirc-circle-page .mpcirc-trigger-add-members:disabled:hover,
body.mpcirc-circle-page .mpcirc-trigger-add-members.disabled:hover {
    background-color: #e5e7eb;
    border-color: #e5e7eb;
    color: #9ca3af;
}

/* Total Selected Counter */
body.mpcirc-circle-page .mpcirc-add-members-selected-count {
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #6b7280;
    position: relative;
    flex-shrink: 0;
}

body.mpcirc-circle-page .mpcirc-add-members-selected-left {
    display: inline-block;
}

body.mpcirc-circle-page .mpcirc-add-members-selected-text {
    margin-right: 4px;
}

body.mpcirc-circle-page .mpcirc-add-members-selected-number {
    font-weight: 600;
    color: #1da69a;
}

body.mpcirc-circle-page .mpcirc-add-members-selected-right {
    position: absolute;
    right: 0;
    top: 0;
}

body.mpcirc-circle-page .mpcirc-add-members-clear-all {
    font-size: 12px;
    color: #1da69a;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-add-members-clear-all:hover {
    color: #0d9488;
    text-decoration: underline;
}

/* Add Members Modal Backdrop */
body.mpcirc-circle-page .mpcirc-add-members-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

body.mpcirc-circle-page .mpcirc-add-members-modal-backdrop.active {
    display: block;
}

/* Responsive Design - matches members page breakpoints */

/* Tablet styles (768px and below) */
@media (max-width: 768px) {
    body.mpcirc-circle-page .mpcirc-page-header-content {
        gap: 20px;
    }

    /* Moderation filter tablet improvements */
    body.mpcirc-circle-page .mpcirc-moderation-filter {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter-list {
        gap: 18px;
        padding-right: 20px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter-link {
        padding: 9px 15px;
        font-size: 13px;
        min-height: 42px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-queue-container {
        padding-right: 30px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-item {
        flex-direction: column;
        gap: 1rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-item-actions {
        align-items: stretch;
        width: 100%;
    }

}

/* Extra small devices (portrait phones, less than 480px) */
@media (max-width: 480px) {
    body.mpcirc-circle-page .mpcirc-page-header h2 {
        font-size: 19px;
    }

    body.mpcirc-circle-page .mpcirc-page-header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter-list {
        gap: 12px;
        /* Ensure better scrolling on small screens */
        padding-right: 28px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter-link {
        padding: 8px 14px;
        font-size: 12px;
        min-height: 40px; /* Slightly smaller for mobile */
        /* Better visual hierarchy */
        font-weight: 600;
    }

}

/* Large mobile devices (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    body.mpcirc-circle-page .mpcirc-page-header-content {
        flex-direction: row;
        align-items: stretch;
        gap: 16px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter {
        margin: 16px 0;
        border-bottom: 1px solid #e5e7eb;
        position: relative;
        /* Extend to edges like table */
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter-list {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        gap: 20px;
        padding-bottom: 2px; /* Space for focus outline */
        /* Ensure proper scroll behavior */
        scroll-behavior: smooth;
        /* Add padding for the gradient fade */
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter-list::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter-link {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0; /* Prevent tabs from shrinking */
        min-width: fit-content;
        /* Better touch target */
        min-height: 44px;
        display: flex;
        align-items: center;
        /* Improve tap area */
    }

    body.mpcirc-circle-page .mpcirc-moderation-filter::after {
        content: '';
        position: absolute;
        right: 16px;
        top: 0;
        bottom: 1px;
        width: 24px;
        background: linear-gradient(to left, #ffffff 100%, rgba(255, 255, 255, 0.8) 50%, transparent 0%);
        pointer-events: none;
        z-index: 2;
    }

}

/* Moderation Item - small screens */
@media (max-width: 768px) {
    body.mpcirc-circle-page .mpcirc-moderation-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-item-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-item-avatar {
        margin-bottom: 0.5rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-avatar {
        width: 40px;
        height: 40px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-item-actions {
        align-items: stretch;
        width: 100%;
        margin-top: 0.5rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-content {
        font-size: 0.95rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-meta-label {
        min-width: 100px;
    }

}

/* Extra small devices */
@media (max-width: 480px) {
    body.mpcirc-circle-page .mpcirc-moderation-item {
        padding: 0.75rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-item-avatar {
        align-self: center;
    }

    body.mpcirc-circle-page .mpcirc-moderation-avatar {
        width: 36px;
        height: 36px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-content {
        font-size: 0.9rem;
    }

    body.mpcirc-circle-page .mpcirc-moderation-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    body.mpcirc-circle-page .mpcirc-moderation-meta-label {
        min-width: auto;
        font-size: 0.75rem;
    }

}

/* Filter improvements - allow horizontal scrolling */
body.mpcirc-circle-page .mpcirc-moderation-filter-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

body.mpcirc-circle-page .mpcirc-moderation-filter-list::-webkit-scrollbar {
    display: none;
}

body.mpcirc-circle-page .mpcirc-visually-hidden {
    visibility: hidden;
}

/* Add Members Modal Error Message */
body.mpcirc-circle-page .mpcirc-add-members-form .mpcirc-form-message {
    margin: 16px 0;
    flex-shrink: 0;
}

/* Add Members Modal Button States */
body.mpcirc-circle-page .mpcirc-trigger-add-members.direct-submission,
body.mpcirc-circle-page #mpcirc-main-content button.mpcirc-trigger-add-members.direct-submission {
    background: #1DA69A; /* Normal teal for direct submission */
    color: #fff;
    border: none;
}

body.mpcirc-circle-page .mpcirc-trigger-add-members.review-mode {
    background: #1DA69A; /* Blue to indicate review step */
}

/* Info icon for muted status tooltip */
body.mpcirc-circle-page .mpcirc-status-info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

body.mpcirc-circle-page .mpcirc-status-info-icon:hover {
    opacity: 1;
}

body.mpcirc-circle-page .mpcirc-status-info-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

body.mpcirc-circle-page .mpcirc-comment-hidden {
    margin-left: 2px !important;
    height: auto !important;
    width: auto !important;
}

/* ===== HIDDEN CONTENT INDICATORS ===== */

/* Post container styling for hidden content */
body.mpcirc-circle-page .mpcirc-post-hidden-banned {
    position: relative;
    opacity: 0.75;
    z-index: 1;
}

body.mpcirc-circle-page .mpcirc-comment-hidden-banned {
    z-index: 1;
}

body.mpcirc-circle-page .mpcirc-comment-hidden-banned .mpcirc-hidden-label {
    margin-right: 30px;
}

body.mpcirc-circle-page .mpcirc-hidden-label {
    cursor: default;
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    font-family: Arial, sans-serif;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Ensure action modals in hidden posts still appear above the hidden label and other elements */
body.mpcirc-circle-page .mpcirc-post-hidden-banned .mpcirc-modal-base {
    z-index: 200;
}

/* Ensure active modals in hidden posts have the highest priority */
body.mpcirc-circle-page .mpcirc-post-hidden-banned .mpcirc-modal-base.active {
    z-index: 1001;
}
