/* ==========================================================================
   PRACTITIONER COMMUNITY MESSAGE BOARD STYLES
   Brand Colors:
   --forest: #2D3E33 (Deep Forest Green)
   --plum: #6C536D (Refined Plum)
   --sage: #4A7B72 (Earthy Sage)
   --sand: #E8E2D6 (Warm Sand)
   --sand-light: #FAF8F5 (Soft Background Stone)
   ========================================================================== */

.community-shell {
    background-color: var(--sand-light, #FAF8F5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.community-main {
    flex-grow: 1;
    padding-top: calc(var(--header-height, 104px) + 2rem) !important;
    padding-bottom: 6rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .community-main {
        padding-top: calc(var(--header-height, 96px) + 1.5rem) !important;
    }
}

/* Header & Intro */
.community-header {
    margin-bottom: 2.5rem;
}

.community-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(108, 83, 109, 0.1);
    color: var(--plum, #6C536D);
    border: 1px solid rgba(108, 83, 109, 0.25);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill, 999px);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.community-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2.2rem, 4vw, 3rem);
    color: var(--forest, #2D3E33);
    margin: 0 0 0.5rem 0;
    line-height: 1.15;
}

.community-subtitle {
    color: var(--text-muted, #5C635E);
    font-size: 1.05rem;
    max-width: 720px;
    line-height: 1.6;
    margin: 0;
}

/* Action Toolbar (Search & New Discussion) */
.community-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    background: #FFFFFF;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    border: 1px solid var(--sand, #E8E2D6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.community-search-wrap {
    position: relative;
    flex: 1 1 320px;
}

.community-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    border: 1.5px solid var(--sand, #E8E2D6);
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    color: var(--text, #2D3E33);
    background: #FAF9F8;
    transition: all 0.2s ease;
}

.community-search-input:focus {
    outline: none;
    border-color: var(--sage, #4A7B72);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(74, 123, 114, 0.15);
}

.community-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8C948F;
    pointer-events: none;
    font-size: 1rem;
}

.community-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-new-topic {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--plum, #6C536D);
    color: #FFFFFF;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill, 999px);
    font-weight: 600;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(108, 83, 109, 0.25);
}

.btn-new-topic:hover {
    background: #553E56;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(108, 83, 109, 0.35);
}

.btn-guidelines-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--forest, #2D3E33);
    border: 1.5px solid var(--sand, #E8E2D6);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-pill, 999px);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-guidelines-trigger:hover {
    background: #FAF8F5;
    border-color: #A2B5AE;
}

/* Category Filter Bar */
.community-categories-bar {
    position: static;
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.community-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-pill, 999px);
    border: 1.5px solid var(--sand, #E8E2D6);
    background: #FFFFFF;
    color: var(--text, #2D3E33);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.community-cat-pill:hover {
    border-color: #A2B5AE;
    transform: translateY(-1px);
}

.community-cat-pill.active {
    background: var(--forest, #2D3E33);
    color: #FFFFFF;
    border-color: var(--forest, #2D3E33);
    box-shadow: 0 4px 10px rgba(45, 62, 51, 0.2);
}

.community-cat-pill .cat-count {
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
}

.community-cat-pill.active .cat-count {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

/* Main Grid Layout (Feed + Sidebar) */
.community-layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 960px) {
    .community-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Discussion Feed */
.community-feed {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 600px;
}

/* Topic Card */
.topic-card {
    background: #FFFFFF;
    border: 1px solid var(--sand, #E8E2D6);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.topic-card:hover {
    border-color: var(--sage, #4A7B72);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.topic-card--pinned {
    border-left: 4px solid #D4A373;
    background: linear-gradient(180deg, #FFFCF7 0%, #FFFFFF 100%);
}

.topic-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.topic-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill, 999px);
}

.topic-category-badge--collaboration {
    background: rgba(108, 83, 109, 0.12);
    color: var(--plum, #6C536D);
    border: 1px solid rgba(108, 83, 109, 0.25);
}

.topic-category-badge--service_swap {
    background: rgba(74, 123, 114, 0.12);
    color: var(--sage, #4A7B72);
    border: 1px solid rgba(74, 123, 114, 0.25);
}

.topic-category-badge--community_advice {
    background: rgba(212, 130, 89, 0.12);
    color: #B5673E;
    border: 1px solid rgba(212, 130, 89, 0.25);
}

.topic-category-badge--events {
    background: rgba(45, 62, 51, 0.1);
    color: var(--forest, #2D3E33);
    border: 1px solid rgba(45, 62, 51, 0.2);
}

.topic-category-badge--admin_feedback {
    background: #EAE6DF;
    color: #4B5563;
    border: 1px solid #D1C9BE;
}

.topic-meta-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-muted, #5C635E);
}

.topic-pin-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #B47836;
    font-weight: 600;
    font-size: 0.75rem;
    background: #FEF3C7;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.topic-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.45rem;
    color: var(--forest, #2D3E33);
    line-height: 1.28;
    margin: 0 0 0.5rem 0;
}

.topic-snippet {
    color: #4B5563;
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F0ECE4;
    padding-top: 0.85rem;
    gap: 1rem;
}

.topic-author {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.topic-author-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--sand, #E8E2D6);
    background: #EAE6DF;
}

.topic-author-details {
    display: flex;
    flex-direction: column;
}

.topic-author-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--forest, #2D3E33);
}

.topic-author-modality {
    font-size: 0.75rem;
    color: var(--text-muted, #5C635E);
}

.topic-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--plum, #6C536D);
    background: rgba(108, 83, 109, 0.08);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

/* Empty State */
.community-empty {
    background: #FFFFFF;
    border: 1px dashed var(--sand, #E8E2D6);
    border-radius: 14px;
    padding: 3.5rem 2rem;
    text-align: center;
}

.community-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.community-empty h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.6rem;
    color: var(--forest, #2D3E33);
    margin: 0 0 0.5rem 0;
}

.community-empty p {
    color: var(--text-muted, #5C635E);
    font-size: 0.95rem;
    max-width: 460px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.5;
}

/* Sidebar */
.community-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.community-sidebar-card {
    background: #FFFFFF;
    border: 1px solid var(--sand, #E8E2D6);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.community-sidebar-card h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.3rem;
    color: var(--forest, #2D3E33);
    margin: 0 0 0.75rem 0;
}

.guidelines-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guidelines-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #4B5563;
    line-height: 1.45;
}

.guidelines-item span.icon {
    font-size: 1rem;
    line-height: 1.2;
}

.btn-sidebar-guidelines {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #FAF9F8;
    color: var(--forest, #2D3E33);
    border: 1.5px solid var(--sand, #E8E2D6);
    border-radius: var(--radius-pill, 999px);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-sizing: border-box;
}

.btn-sidebar-guidelines:hover {
    background: #F0ECE4;
    border-color: var(--sage, #4A7B72);
    color: var(--forest, #2D3E33);
    transform: translateY(-1px);
}

/* Thread Detail Drawer / Modal */
.thread-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 760px;
    background: #FFFFFF;
    z-index: 10000;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.thread-drawer.open {
    transform: translateX(0);
}

.thread-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.thread-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.thread-drawer-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--sand, #E8E2D6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FAF8F5;
}

.thread-drawer-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #6B7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 6px;
}

.thread-drawer-close-btn:hover {
    color: #111827;
    background: #E5E7EB;
}

.thread-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 2rem 2.25rem;
}

.thread-op-card {
    background: #FAF9F8;
    border: 1px solid var(--sand, #E8E2D6);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.thread-op-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #2D3E33;
    white-space: pre-line;
    margin: 1.25rem 0 0 0;
}

.thread-replies-heading {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.45rem;
    color: var(--forest, #2D3E33);
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.thread-replies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.reply-bubble {
    background: #FFFFFF;
    border: 1px solid #EAE6DF;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.reply-bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.reply-bubble-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.reply-bubble-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: #EAE6DF;
}

.reply-bubble-content {
    font-size: 0.94rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-line;
}

/* Reply Composer */
.thread-composer-box {
    border-top: 1px solid var(--sand, #E8E2D6);
    padding: 1.5rem 2.25rem;
    background: #FFFFFF;
}

.thread-composer-textarea {
    width: 100%;
    min-height: 90px;
    border: 1.5px solid var(--sand, #E8E2D6);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    color: #2D3E33;
    resize: vertical;
    margin-bottom: 0.85rem;
    box-sizing: border-box;
}

.thread-composer-textarea:focus {
    outline: none;
    border-color: var(--plum, #6C536D);
    box-shadow: 0 0 0 3px rgba(108, 83, 109, 0.15);
}

.thread-composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modals */
.community-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.community-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.community-modal-card {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.25rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    position: relative;
    border: 1px solid var(--sand, #E8E2D6);
}

.community-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
}

.community-modal-close:hover {
    color: #1F2937;
}

/* Seeker / Non-practitioner Restriction Notice */
.community-gate-card {
    background: #FFFFFF;
    border: 1.5px solid var(--sand, #E8E2D6);
    border-radius: 16px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    max-width: 680px;
    margin: 2rem auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.community-gate-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.community-gate-card h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2.2rem;
    color: var(--forest, #2D3E33);
    margin: 0 0 0.75rem 0;
}

.community-gate-card p {
    color: #4B5563;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.community-gate-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   PHASE 1: STATUS BADGES, BOOKMARKS & QUICK-CARD STYLES
   ========================================================================== */

/* Status Badges */
.topic-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill, 999px);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.topic-status-badge--seeking {
    background: #EAF5EE;
    color: #2D524B;
    border: 1px solid #B8D5C8;
}

.topic-status-badge--in_discussion {
    background: #F3EFF5;
    color: #5E3A68;
    border: 1px solid #D9CEE0;
}

.topic-status-badge--completed {
    background: #F3F4F6;
    color: #4B5563;
    border: 1px solid #E5E7EB;
}

/* Card Bookmark Toggle Button */
.topic-bookmark-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    opacity: 0.45;
    transition: all 0.2s ease;
    line-height: 1;
}

.topic-bookmark-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.topic-bookmark-btn.active {
    opacity: 1;
    filter: drop-shadow(0 1px 2px rgba(212, 163, 115, 0.4));
    transform: scale(1.1);
}

/* Thread Drawer Bookmark Button */
.btn-thread-bookmark {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #FAF9F8;
    border: 1px solid var(--sand, #E8E2D6);
    color: var(--forest, #2D3E33);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-thread-bookmark:hover {
    background: #F2EFE9;
    border-color: #D1C9BE;
}

.btn-thread-bookmark.active {
    background: #FBF4E8;
    border-color: #E2C799;
    color: #8A5A18;
}

/* Thread Drawer Flag / Report Button */
.btn-report-topic {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #FAF9F8;
    border: 1px solid var(--sand, #E8E2D6);
    color: var(--text-muted, #5C635E);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-report-topic:hover {
    background: #FEF2F2;
    border-color: #FCA5A5;
    color: #991B1B;
}

.btn-report-topic svg {
    stroke-width: 2;
}

/* Thread Drawer Status Select Dropdown (OP/Admin) */
.thread-status-select {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid #D1D5DB;
    background: #FFFFFF;
    color: #374151;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.thread-status-select:focus {
    border-color: var(--sage, #4A7B72);
}

/* Author Clickable Link & Hover */
.topic-author-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.topic-author-clickable:hover {
    opacity: 0.82;
}

.topic-author-clickable:hover .topic-author-name {
    text-decoration: underline;
    text-decoration-color: var(--sage, #4A7B72);
}

/* Quick Card Specialties Pill */
.quick-card-specialty-pill {
    font-size: 0.75rem;
    background: #EAF5EE;
    color: #2D524B;
    border: 1px solid #B8D5C8;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-weight: 500;
}

/* ==========================================================================
   PHASE 2: CALM REACTIONS (Resonate, Helpful, Appreciate, Celebrate)
   ========================================================================== */

.thread-reactions-bar,
.reply-reactions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #FAF9F8;
    border: 1px solid var(--sand, #E8E2D6);
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    color: var(--forest, #2D3E33);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    user-select: none;
}

.reaction-pill:hover {
    background: #F3EFEA;
    border-color: #D4CBBE;
    transform: translateY(-1px);
}

.reaction-pill.active {
    background: #EEF5F1;
    border-color: #8EB9A6;
    color: #1E463C;
    font-weight: 600;
}

.reaction-pill .reaction-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: inherit;
}

.card-reactions-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.76rem;
    color: var(--text-muted, #5C635E);
    background: #FAF8F5;
    border: 1px solid #EAE5DD;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

/* ==========================================================================
   PHASE 2: LIGHTWEIGHT PEER POLLS
   ========================================================================== */

.thread-poll-wrapper {
    margin: 1.25rem 0 1rem 0;
}

.poll-container {
    background: #FAF9F7;
    border: 1.5px solid var(--sand, #E8E2D6);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.poll-question {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--forest, #2D3E33);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.poll-badge {
    font-size: 0.7rem;
    background: #E8EFF5;
    color: #244163;
    border: 1px solid #BDD0E2;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.poll-option-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poll-option-item {
    position: relative;
    border: 1.5px solid var(--sand, #E8E2D6);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    background: #FFFFFF;
    transition: all 0.2s ease;
    overflow: hidden;
    user-select: none;
}

.poll-option-item:hover {
    border-color: var(--sage, #4A7B72);
}

.poll-option-item.voted {
    border-color: var(--sage, #4A7B72);
    font-weight: 600;
}

.poll-progress-bg {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(74, 123, 114, 0.12);
    z-index: 1;
    transition: width 0.35s ease;
    border-radius: 6px 0 0 6px;
}

.poll-option-item.voted .poll-progress-bg {
    background: rgba(74, 123, 114, 0.22);
}

.poll-option-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #374151;
}

.poll-option-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.poll-check-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #9CA3AF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.poll-option-item.voted .poll-check-circle {
    background: var(--sage, #4A7B72);
    border-color: var(--sage, #4A7B72);
    color: #FFFFFF;
}

.poll-option-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted, #5C635E);
    font-variant-numeric: tabular-nums;
}

.poll-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: #6B7280;
}

.topic-poll-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Modal Poll Builder Inputs */
.poll-builder-option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.poll-builder-option-input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 0.88rem;
    box-sizing: border-box;
    background: #FFFFFF;
}

.btn-remove-poll-opt {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 4px;
}

.btn-remove-poll-opt:hover {
    color: #DC2626;
    background: #FEE2E2;
}

/* ==========================================================================
   PHASE 3: ACTIVITY SUB-FILTER TABS (All / My Discussions / Participated)
   ========================================================================== */

.feed-subfilter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.feed-subfilter-pill {
    background: #FAF9F8;
    border: 1px solid var(--sand, #E8E2D6);
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #4B5563;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    user-select: none;
}

.feed-subfilter-pill:hover {
    background: #F3EFEA;
    border-color: #D4CBBE;
    color: var(--forest, #2D3E33);
}

.feed-subfilter-pill.active {
    background: var(--forest, #2D3E33);
    border-color: var(--forest, #2D3E33);
    color: #FFFFFF;
    font-weight: 600;
}

/* ==========================================================================
   PHASE 3: COMPOSER FORMATTING TOOLBAR & RICH TEXT
   ========================================================================== */

.composer-formatting-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #FAF9F8;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 0.15rem 0.35rem;
}

.formatting-btn {
    background: none;
    border: none;
    font-size: 0.76rem;
    color: #4B5563;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}

.formatting-btn:hover {
    background: #E5E7EB;
    color: #111827;
}

/* Rich text rendered elements inside OP content and replies */
.thread-op-content blockquote,
.reply-bubble-content blockquote {
    margin: 0.5rem 0;
    padding: 0.45rem 0.85rem;
    border-left: 3px solid var(--sage, #4A7B72);
    background: rgba(74, 123, 114, 0.05);
    font-style: italic;
    color: #374151;
    border-radius: 0 4px 4px 0;
}

.thread-op-content ul,
.reply-bubble-content ul {
    margin: 0.5rem 0;
    padding-left: 1.35rem;
    list-style-type: disc;
}

.thread-op-content li,
.reply-bubble-content li {
    margin-bottom: 0.25rem;
}

.thread-op-content p,
.reply-bubble-content p {
    margin: 0 0 0.55rem 0;
}

.thread-op-content p:last-child,
.reply-bubble-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   PHASE 3: THREADED NESTED REPLIES
   ========================================================================== */

.btn-reply-nested {
    background: none;
    border: none;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--sage, #4A7B72);
    cursor: pointer;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-reply-nested:hover {
    background: #EEF5F1;
    color: #234E44;
}

.nested-replies-container {
    margin-top: 0.75rem;
    margin-left: 1.25rem;
    padding-left: 0.85rem;
    border-left: 2px solid var(--sand, #E8E2D6);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.reply-bubble--nested {
    background: #FFFFFF;
    border: 1px solid #EAE6DF;
    border-radius: 8px;
    padding: 0.75rem 0.95rem;
    margin-bottom: 0;
}

/* ==========================================================================
   Pinned Community Etiquette Banner
   ========================================================================== */
.community-etiquette-banner {
    background: #FAF8F5;
    border: 1px solid rgba(74, 123, 114, 0.25);
    border-left: 4px solid var(--sage, #4A7B72);
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(45, 62, 51, 0.04);
    position: relative;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.community-etiquette-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.community-etiquette-banner-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.25rem;
    color: var(--forest, #2D3E33);
    margin: 0;
    line-height: 1.25;
}

.community-etiquette-dismiss-btn {
    background: transparent;
    border: none;
    color: #8C827A;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.community-etiquette-dismiss-btn:hover {
    color: var(--forest, #2D3E33);
    background: rgba(0, 0, 0, 0.05);
}

.community-etiquette-lead {
    font-size: 0.92rem;
    color: #4B5563;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.community-etiquette-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.community-etiquette-list li {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.5;
    position: relative;
    padding-left: 1.2rem;
}

.community-etiquette-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: -0.05rem;
    color: var(--sage, #4A7B72);
    font-weight: 700;
    font-size: 1.15rem;
}

/* ==========================================================================
   Practitioner Quick-Card Modal Actions
   ========================================================================== */
.quick-card-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.quick-card-btn-primary {
    flex: 1;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 999px;
    background: var(--plum, #6C536D);
    color: #FFFFFF !important;
    text-decoration: none;
    border: 1.5px solid transparent;
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.15s ease;
}

.quick-card-btn-primary:hover {
    background: #553F56;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.quick-card-btn-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1.5px solid var(--plum, #6C536D);
    color: var(--plum, #6C536D) !important;
    text-decoration: none;
    background: transparent;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.quick-card-btn-outline:hover {
    background: rgba(108, 83, 109, 0.08);
    border-color: #553F56;
    color: #553F56 !important;
    transform: translateY(-1px);
}


