.community-card {
    position: relative;
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
    cursor: pointer;
}

.community-group-btn {
    text-decoration: none;
    display: inline-flex;
}

/* --- Community posts gallery (mosaic feed) --- */
.community-page .community-posts-gallery {
    --gallery-gap: 10px;
    --gallery-row-height: calc((min(600px, 92vw) - var(--gallery-gap)) / 2);

    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: var(--gallery-row-height);
    gap: var(--gallery-gap);
    width: min(100%, calc(var(--gallery-row-height) * 3 + var(--gallery-gap) + 1.1rem));
    margin: 0 auto;
    padding: 0 0.55rem;
    box-sizing: border-box;
}

.community-page .community-posts-gallery-cell {
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.community-page .community-posts-gallery-item {
    --community-gallery-footer-gradient: linear-gradient(
        180deg,
        transparent 0%,
        rgba(15, 23, 42, 0.72) 42%,
        rgba(15, 23, 42, 0.92) 100%
    );

    display: grid;
    grid-template: 1fr / 1fr;
    position: relative;
    height: 100%;
    overflow: hidden;
    background: #1e293b;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.community-page .community-posts-gallery-item.is-text-only {
    background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
}

.community-page .community-posts-gallery-item-media {
    grid-area: 1 / 1;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.community-page .community-posts-gallery-item-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    vertical-align: top;
}

.community-page .community-posts-gallery-item-preview {
    height: 100%;
    padding: 0.85rem 0.9rem 0.5rem;
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #f8fafc;
}

.community-page .community-posts-gallery-item-preview.community-text a {
    color: #e2e8f0;
}

/* Facebook-style large text for short text-only posts (<= 85 chars). */
.community-page .community-posts-gallery-item.is-short-post-text .community-posts-gallery-item-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.9rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: 0.01em;
}

.community-page .community-posts-gallery-cell--tr .community-posts-gallery-item.is-short-post-text .community-posts-gallery-item-preview,
.community-page .community-posts-gallery-cell--bl .community-posts-gallery-item.is-short-post-text .community-posts-gallery-item-preview {
    font-size: 1.5rem;
    line-height: 1.28;
}

.community-page .community-posts-gallery-item.is-short-post-text .community-posts-gallery-item-preview .community-hashtag {
    color: #bfdbfe;
}

.community-page .community-posts-gallery-item-footer {
    grid-area: 1 / 1;
    align-self: end;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    padding: 2rem 0.65rem 0.55rem;
    background: var(--community-gallery-footer-gradient);
    color: #f8fafc;
    font-size: 0.78rem;
    line-height: 1.3;
    pointer-events: none;
}

.community-page .community-posts-gallery-item-author {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: auto;
}

.community-page .community-posts-gallery-item-author:hover {
    color: #e2e8f0;
    text-decoration: underline;
}

.community-page .community-posts-gallery-item-snippet {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.74rem;
    color: #f8fafc;
    opacity: 0.95;
}

.community-page .community-posts-gallery-item-snippet.community-text a {
    color: #e2e8f0;
}

.community-page .community-posts-gallery-item-date {
    font-size: 0.7rem;
    color: #e2e8f0;
    opacity: 0.92;
}

.community-page .community-posts-gallery-item .community-card-portfolio-badge,
.community-page .community-posts-gallery-item .community-card-quote-engage-badge {
    z-index: 3;
}

.community-page .community-posts-gallery-cell.is-frame-last-bl {
    grid-column: 1 / -1 !important;
}

.community-page .community-company-scope-sentinel {
    grid-column: 1 / -1;
    width: 100%;
    height: 1px;
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .community-page .community-posts-gallery {
        --gallery-row-height: calc((min(420px, 96vw) - var(--gallery-gap)) / 2);
    }
}

/* --- Community filter bar --- */
.community-filter-bar {
    position: relative;
    z-index: 30;
    overflow: visible;
}

.community-filter-bar-card {
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
    overflow: visible;
}

.community-filter-bar-header {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%);
}

.community-filter-bar-title {
    display: inline-flex;
    align-items: center;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: 0.01em;
}

.community-filter-bar-title-sep {
    font-weight: 500;
    color: #94a3b8;
}

.community-filter-bar-post-count {
    font-weight: 700;
    color: #2563eb;
    font-variant-numeric: tabular-nums;
}

.community-filter-bar-body {
    padding: 1rem 1.15rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow: visible;
}

.community-filter-bar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.85rem 1rem;
    overflow: visible;
}

.community-filter-bar-row-secondary {
    align-items: center;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(37, 99, 235, 0.16);
}

.community-filter-bar-row-primary {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    gap: 0.65rem 0.75rem;
}

.community-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 11rem;
    flex: 1 1 11rem;
    max-width: 18rem;
    overflow: visible;
}

.community-filter-field-options {
    max-width: none;
    flex: 1 1 14rem;
}

.community-filter-field-label,
.community-filter-subsection-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.community-filter-subsection-label {
    margin-right: 0.15rem;
}

.community-filter-dropdown-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2.65rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.community-filter-dropdown-toggle:hover,
.community-filter-dropdown-toggle:focus,
.community-filter-dropdown-toggle.show {
    border-color: rgba(37, 99, 235, 0.45);
    background: #f8fbff;
    color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.community-filter-dropdown-toggle-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.community-filter-dropdown-menu {
    width: min(22rem, 92vw);
    max-height: min(24rem, 70vh);
    overflow: auto;
    padding: 0.45rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    z-index: 1060;
}

.community-filter-dropdown-menu-groups {
    width: min(26rem, 94vw);
}

.community-filter-dropdown-menu-years,
.community-filter-dropdown-menu-months {
    width: min(14rem, 88vw);
}

.community-filter-period-group {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.65rem;
}

.community-filter-period-group > .community-filter-field {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 7.25rem;
    width: 7rem;
}

.community-filter-field-period {
    min-width: 0;
    max-width: 7.25rem;
    flex: 0 0 auto;
    width: 7rem;
}

.community-filter-field-compact {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 8.5rem;
    width: 7.25rem;
}

.community-filter-field-feed {
    max-width: 7rem;
    width: 6.75rem;
}

.community-filter-field-groups {
    flex: 0 1 auto;
    min-width: 7rem;
    max-width: 11rem;
    width: auto;
}

.community-filter-field-compact .community-filter-dropdown-toggle {
    min-height: 2.45rem;
    padding: 0.38rem 0.55rem;
    font-size: 0.84rem;
}

.community-filter-field-compact .community-filter-active-chip {
    min-height: 2.45rem;
    padding: 0.28rem 0.5rem 0.28rem 0.35rem;
}

.community-filter-active-chip-avatar {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: #eff6ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.community-filter-active-chip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-filter-active-chip-fallback {
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
}

.community-filter-field-feed .community-filter-dropdown-toggle-text {
    max-width: 4.25rem;
}

.community-filter-field-compact:not(.community-filter-field-feed) .community-filter-dropdown-toggle-text {
    max-width: 5.25rem;
}

.community-filter-dropdown-menu-scope,
.community-filter-dropdown-menu-view {
    width: min(16rem, 88vw);
}

.community-filter-dropdown-menu-companies {
    width: min(22rem, 92vw);
    max-height: min(26rem, 70vh);
    overflow-y: auto;
    padding-top: 0;
}

.community-filter-dropdown-search-item {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.45rem 0.5rem 0.4rem;
    margin: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.community-filter-company-search {
    border-radius: 10px;
    border-color: rgba(37, 99, 235, 0.22);
    font-size: 0.84rem;
}

.community-filter-company-search:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.12);
}

.community-filter-company-item .community-filter-dropdown-item-title {
    white-space: normal;
    line-height: 1.25;
}

.community-filter-company-empty {
    list-style: none;
}

.community-filter-field-inline {
    min-width: 8rem;
    max-width: 11rem;
}

.community-filter-inline-control-field {
    min-height: 2.65rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.community-filter-recent-days-select {
    min-width: 3.5rem;
    width: auto;
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
    font-weight: 600;
    color: #1e3a8a;
}

.community-filter-recent-days-select:focus {
    box-shadow: none;
}

.community-filter-dropdown-divider {
    margin: 0.35rem 0;
    border-color: rgba(37, 99, 235, 0.12);
}

.community-filter-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.55rem;
    border-radius: 10px;
    color: #0f172a;
}

.community-filter-dropdown-item-compact {
    justify-content: space-between;
}

.community-filter-dropdown-item:hover,
.community-filter-dropdown-item:focus {
    background: rgba(37, 99, 235, 0.08);
    color: #1e3a8a;
}

.community-filter-dropdown-item.is-active {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-weight: 600;
}

.community-filter-dropdown-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 85px;
    height: 85px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #111827;
}

.community-filter-dropdown-thumb-neutral {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.18);
}

.community-filter-dropdown-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-filter-dropdown-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.35rem;
    color: #ffffff;
}

.community-filter-dropdown-thumb-neutral .community-filter-dropdown-fallback {
    color: #2563eb;
    font-size: 1.6rem;
}

.community-filter-dropdown-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1 1 auto;
}

.community-filter-dropdown-item-title {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.community-filter-dropdown-item-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
}

.community-filter-options-panel {
    min-height: 2.65rem;
    display: flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 12px;
    background: #ffffff;
}

.community-filter-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.community-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: #ffffff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.community-filter-pill:hover {
    border-color: rgba(37, 99, 235, 0.42);
    color: #1d4ed8;
    background: #f8fbff;
}

.community-filter-pill.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.community-filter-pill-count {
    font-size: 0.74rem;
    opacity: 0.9;
}

.community-filter-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex: 1 1 auto;
}

.community-admin-tools .community-filter-bar-header {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(37, 99, 235, 0.03) 100%);
}

.community-admin-tools .community-filter-bar-title {
    color: #312e81;
}

.community-admin-tools-options-panel {
    flex: 1 1 auto;
    max-width: 28rem;
}

.community-admin-tool-btn {
    white-space: nowrap;
}

.community-filter-inline-control {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.community-filter-inline-label {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0;
}

.community-group-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.community-group-filters-primary {
    margin-bottom: 0;
}

.community-group-filters-groups {
    margin-bottom: 0;
}

.community-group-thumb {
    position: relative;
    width: 170px;
    height: 170px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #111827;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.community-group-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.community-group-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 2.5rem;
}

.community-group-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.18) 42%,
        rgba(15, 23, 42, 0.18) 58%,
        rgba(15, 23, 42, 0.82) 100%
    );
    color: #ffffff;
    pointer-events: none;
}

.community-group-title {
    position: absolute;
    top: 0.65rem;
    left: 0.75rem;
    right: 2.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.community-group-count {
    position: absolute;
    right: 0.75rem;
    bottom: 0.65rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    text-align: right;
}

.community-group-btn:hover .community-group-thumb {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.community-group-btn.is-active .community-group-thumb {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.community-card-fixed {
    height: 100%;
    min-height: 400px;
}

.community-card-action {
    position: relative;
}

.community-card-portfolio-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    font-size: 0.72rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

.community-card-action:has(.community-card-quote-engage-badge) .community-card-portfolio-badge {
    right: 2.35rem;
}

.community-card-quote-engage-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    left: auto;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.92);
    color: #fffbeb;
    font-size: 0.72rem;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.28);
    pointer-events: none;
}

.community-card-quote-engage-badge.is-status-success {
    background: rgba(22, 101, 52, 0.92);
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.28);
    color: #f0fdf4;
}

.community-card-quote-engage-badge.is-status-failed {
    background: rgba(185, 28, 28, 0.92);
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.28);
    color: #fef2f2;
}

.community-card-quote-engage-badge.is-status-skipped {
    background: rgba(71, 85, 105, 0.92);
    box-shadow: 0 2px 8px rgba(71, 85, 105, 0.28);
    color: #f8fafc;
}

.community-hide-quote-engage-switch {
    flex-shrink: 0;
}

.community-hide-quote-engage-switch .form-check-input {
    cursor: pointer;
}

.community-hide-quote-engage-switch .form-check-label {
    cursor: pointer;
    user-select: none;
}

.community-card-author-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.community-card-group-row {
    font-size: 0.85rem;
    color: #6b7280;
}

.community-card-group-link {
    color: #6b7280;
    text-decoration: none;
}

.community-card-group-link:hover {
    text-decoration: underline;
}

.community-card-avatar-wrap {
    flex: 0 0 auto;
}

.community-card-avatar,
.community-card-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 999px;
}

.community-card-avatar {
    object-fit: cover;
    display: block;
}

.community-card-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    background: #6b7280;
}

.community-card-author-link {
    color: #111827;
    text-decoration: none;
}

.community-card-author-link:hover {
    text-decoration: underline;
}

.community-card-date-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.community-card-date-rel:empty {
    display: none;
}

.community-card-date-rel::before {
    content: "•";
    margin-right: 0.4rem;
    opacity: 0.6;
}

.community-filter-field-company-picker {
    max-width: 10rem;
    width: 8.5rem;
}

.community-filter-field-company-active,
.community-filter-field-author-active {
    flex: 1 1 auto;
    min-width: 9rem;
    max-width: 16rem;
    width: auto;
}

.community-filter-active-chip {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.65rem;
    padding: 0.35rem 0.55rem 0.35rem 0.4rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 12px;
    background: #ffffff;
    color: #1e3a8a;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
    text-decoration: none;
}

.community-filter-active-chip:hover,
.community-filter-active-chip:focus {
    border-color: rgba(37, 99, 235, 0.45);
    background: #f8fbff;
    color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.community-filter-active-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}

.community-filter-active-chip-count {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.community-filter-active-chip-clear {
    flex: 0 0 auto;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: #64748b;
}

.community-filter-active-chip:hover .community-filter-active-chip-clear,
.community-filter-active-chip:focus .community-filter-active-chip-clear {
    border-color: rgba(37, 99, 235, 0.45);
    color: #1d4ed8;
}

.community-author-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

.community-author-filter-chip-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
}

.community-author-filter-chip-text {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-author-filter-chip-count {
    font-weight: 600;
    margin-left: 0.15rem;
}

.community-author-filter-chip-x {
    margin-left: auto;
    width: 18px;
    height: 18px;
    line-height: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid rgba(15, 23, 42, 0.18);
    opacity: 0.8;
}

.community-author-filter-chip:hover .community-author-filter-chip-x {
    opacity: 1;
}

.community-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.community-text {
    font-size: 0.95rem;
    color: #1f2937;
    min-height: 1.3rem;
}

.community-hashtag {
    color: #2563eb;
}

.community-meta {
    display: flex;
    gap: 16px;
    align-items: center;
}

.community-modal-text {
    white-space: pre-wrap;
    color: #1f2937;
    font-size: 0.98rem;
}

.community-modal-date {
    color: #1f2937;
    opacity: 0.7;
}

.community-modal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.community-modal-dialog {
    max-width: 820px;
    width: 820px;
}

@media (max-width: 900px) {
    .community-modal-dialog {
        width: calc(100% - 2rem);
        max-width: calc(100% - 2rem);
    }
}

.community-modal-comments-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.community-modal-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.community-modal-comment {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.community-modal-comment-avatar-wrap {
    flex: 0 0 auto;
}

.community-modal-comment-avatar,
.community-modal-comment-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 999px;
}

.community-modal-comment-avatar {
    object-fit: cover;
    display: block;
}

.community-modal-comment-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: #6b7280;
}

.community-modal-comment-content {
    flex: 1 1 auto;
    min-width: 0;
}

.community-modal-comment-author {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.community-modal-comment-text {
    color: #1f2937;
    margin-bottom: 0.25rem;
    white-space: pre-wrap;
}

.community-modal-comment-date {
    font-size: 0.85rem;
    color: #6b7280;
}

.community-modal-comment-attachment {
    border: none;
    background: transparent;
    padding: 0;
    margin-bottom: 0.35rem;
    cursor: pointer;
}

.community-modal-comment-attachment-thumb {
    width: 100%;
    max-width: 220px;
    max-height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.community-modal-image-full {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 14px;
}

.community-modal-comment-empty {
    font-size: 0.9rem;
    color: #6b7280;
}

.community-day-group {
    margin-bottom: 1.5rem;
}

.community-day-toggle {
    width: 100%;
    border: none;
    background: rgba(15, 23, 42, 0.04);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1f2937;
    font-weight: 600;
}

.community-day-toggle:hover {
    background: rgba(15, 23, 42, 0.08);
}

.community-day-count {
    color: #6b7280;
    font-weight: 500;
}

.community-day-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.community-day-scrape-btn {
    line-height: 1.1;
}

.community-day-group.is-collapsed .community-day-posts {
    display: none;
}

.community-day-loading {
    width: 100%;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    padding: 0.75rem 0;
}

.mosaic-grid {
    display: grid;
    gap: 6px;
}

.mosaic-grid[data-use-ratio="true"] {
    grid-auto-rows: auto;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    min-height: 140px;
    background: #f3f4f6;
    aspect-ratio: var(--ratio, 1 / 1);
}

.mosaic-item[data-has-ratio="true"] {
    min-height: 0;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.mosaic-count-1 {
    grid-template-columns: 1fr;
}

.mosaic-count-1 .mosaic-item {
    min-height: 320px;
}

.mosaic-count-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mosaic-count-2 .mosaic-item {
    min-height: 180px;
}

.mosaic-grid[data-use-ratio="true"].mosaic-count-2 {
    grid-template-rows: auto;
}

.mosaic-count-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 160px);
}

.mosaic-count-3 .mosaic-item:first-child {
    grid-row: span 2;
}

.mosaic-count-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 160px);
}

.mosaic-grid[data-use-ratio="true"].mosaic-count-3,
.mosaic-grid[data-use-ratio="true"].mosaic-count-4 {
    grid-template-rows: auto;
}

.mosaic-grid[data-use-ratio="true"] .mosaic-item {
    height: auto;
    min-height: 0;
}

.mosaic-count-1 .mosaic-item[data-has-ratio="true"],
.mosaic-count-2 .mosaic-item[data-has-ratio="true"] {
    min-height: 0;
}

.mosaic-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.community-company-recent-days-select {
    width: auto;
    min-width: 4.5rem;
}

.community-company-logos-grid {
    --community-logo-card-radius: 10px;
}

.community-company-logos-grid .community-company-logo-card {
    padding: 0.2rem;
    gap: 0.35rem;
}

.community-company-logos-grid .community-company-logo-card-name {
    font-size: 0.68rem;
    line-height: 1.2;
}

.community-company-logos-grid .community-company-logo-card-source {
    font-size: 0.5rem;
    top: 0.2rem;
    left: 0.2rem;
}

.community-company-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
    padding: 0.35rem;
    border-radius: var(--community-logo-card-radius);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.community-company-logo-card:hover {
    transform: translateY(-2px);
    color: inherit;
}

.community-company-logo-card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--community-logo-card-radius);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    position: relative;
}

.community-company-logo-card.is-facebook-import .community-company-logo-card-image-wrap {
    border-color: rgba(24, 119, 242, 0.45);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.12), 0 4px 14px rgba(15, 23, 42, 0.08);
}

.community-company-logo-card-source {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    z-index: 2;
    max-width: calc(100% - 0.7rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.62rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
}

.community-company-logo-card.is-facebook-import .community-company-logo-card-source {
    background: rgba(24, 119, 242, 0.92);
}

#communityCompanyCreationSourceWrap.is-facebook-import {
    border: 1px solid rgba(24, 119, 242, 0.35);
    background: rgba(24, 119, 242, 0.08);
    color: #0f172a;
}

.community-company-logo-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-company-logo-card-name {
    display: block;
    width: 100%;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
}

.community-company-contacts {
    --community-contacts-logo-size: 280px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.community-company-contacts-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    padding: 1rem 1.15rem;
}

.community-company-contacts-logo-col {
    flex: 0 0 auto;
    width: var(--community-contacts-logo-size);
    height: var(--community-contacts-logo-size);
    max-width: min(var(--community-contacts-logo-size), 70vw);
    max-height: min(var(--community-contacts-logo-size), 70vw);
    overflow: hidden;
    border-radius: 14px;
}

.community-company-contacts-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.community-company-contacts-body {
    flex: 1 1 auto;
    min-width: 0;
}

.community-company-contacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.community-company-contacts-header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.community-company-contacts-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.community-company-contacts-name {
    margin-bottom: 0.5rem;
}

.community-company-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.community-company-contacts-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
}

.community-company-contacts-phone-icon {
    color: #198754;
    width: 1.1rem;
    text-align: center;
    flex: 0 0 1.1rem;
}

.community-company-contacts-email-emoji,
.community-company-contacts-address-icon,
.community-company-contacts-social-icon {
    width: 1.1rem;
    text-align: center;
    flex: 0 0 1.1rem;
}

.community-company-contacts-item-label {
    font-weight: 600;
}

.community-company-contacts-address-icon {
    width: 1.25rem;
    text-align: center;
    color: #64748b;
}

.community-company-contacts-address .community-company-contacts-item-text a {
    white-space: pre-line;
}

.community-company-contacts-map-preview {
    cursor: pointer;
    border-radius: 0.45rem;
    transition: background-color 0.15s ease;
}

.community-company-contacts-map-preview:hover,
.community-company-contacts-map-preview:focus-visible {
    background: rgba(13, 110, 253, 0.08);
    outline: none;
}

.community-company-contacts-service-range-icon {
    width: 1.25rem;
    text-align: center;
    color: #64748b;
    flex: 0 0 1.25rem;
}

.community-company-service-range-panel {
    margin-top: 0.5rem;
}

.community-company-contacts-service-range .community-company-contacts-item-text {
    white-space: normal;
}

.community-company-contacts-item-text a {
    text-decoration: none;
}

.community-company-contacts-item-text a:hover {
    text-decoration: underline;
}

.community-company-modal-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 0.75rem;
}

.community-company-modal-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
}

#communityCompanyContactsModal .modal-body {
    position: relative;
}

.community-company-contacts-modal-dialog {
    max-width: 920px;
    width: 100%;
}

@media (max-width: 960px) {
    .community-company-contacts-modal-dialog {
        max-width: calc(100% - 2rem);
    }
}

.community-company-logo-preview-wrap {
    width: 120px;
    height: 120px;
}

.community-company-logo-preview,
.community-company-logo-preview-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    object-fit: cover;
}

.community-company-logo-preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
    background: rgba(15, 23, 42, 0.03);
}

.community-company-banner-preview-wrap {
    width: 100%;
    max-width: 360px;
}

#communityCompanyContactsModal .community-company-modal-media-col {
    text-align: left;
}

#communityCompanyContactsModal .community-company-modal-media-col .community-company-banner-preview-wrap {
    max-width: 100%;
}

#communityCompanyContactsModal .community-company-racius-scrape-btn.is-success {
    color: #fff;
    border-color: #198754;
    background-color: #198754;
}

#communityCompanyContactsModal .community-company-racius-scrape-btn.is-success:hover,
#communityCompanyContactsModal .community-company-racius-scrape-btn.is-success:focus {
    color: #fff;
    border-color: #157347;
    background-color: #157347;
}

.community-company-racius-cae-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.community-company-racius-cae-option {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.5rem;
    background: #fff;
}

.community-company-racius-cae-option:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.03);
}

.community-company-racius-cae-option-label {
    font-size: 0.82rem;
    line-height: 1.35;
}

.community-company-racius-cae-option-code {
    font-weight: 600;
}

.community-company-cae-proof-zone {
    border: 1px dashed rgba(15, 23, 42, 0.22);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.02);
    min-height: 120px;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.community-company-cae-proof-zone.is-dragover {
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(37, 99, 235, 0.06);
}

.community-company-cae-proof-zone.is-clickable {
    cursor: pointer;
}

.community-company-cae-proof-zone.is-clickable:hover {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.04);
}

.community-company-cae-proof-empty {
    width: 100%;
}

.community-company-cae-proof-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.community-company-cae-proof-preview-img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}

.community-company-cae-proof-modal-body {
    min-height: 240px;
}

.community-company-cae-proof-modal-img {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.community-company-cae-proof-modal-pdf {
    width: 100%;
    min-height: 55vh;
    border: 0;
    display: block;
}

.community-company-racius-cae-col.is-cae-proof-clickable {
    cursor: pointer;
    border-radius: 0.65rem;
    padding: 0.35rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.03);
}

.community-company-racius-cae-col.is-cae-proof-clickable:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.06);
}

.community-company-banner-preview {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    object-fit: contain;
}

.community-company-geocode-status {
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
}

.community-company-geocode-status.is-pending {
    color: #475569;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

.community-company-geocode-status.is-ok {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
}

.community-company-geocode-status.is-failed {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.community-company-banner-preview-placeholder {
    width: 100%;
    min-height: 96px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
    background: rgba(15, 23, 42, 0.03);
}

.community-company-banner-section {
    margin-top: 1.5rem;
}

.community-author-posts-show-more-wrap {
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
}

.community-author-posts-show-more-btn {
    font-weight: 600;
    text-decoration: none;
}

.community-author-posts-show-more-btn:hover {
    text-decoration: underline;
}

.community-company-banner {
    width: 100%;
    height: auto;
    max-height: 250px;
    display: block;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
    object-fit: contain;
}

.community-company-service-catalog {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.community-company-service-group-heading {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin: 0.15rem 0 0.1rem;
}

.community-company-service-catalog-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.community-company-service-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 7.5rem;
    max-width: 10rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: #fff;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-company-service-card:hover {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.community-company-service-card.is-selected,
.community-company-service-card.is-offered {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(22, 163, 74, 0.65);
    color: #14532d;
}

.community-company-contacts-services-heading-emoji,
.community-company-contacts-social-heading-emoji {
    margin-right: 0.15rem;
}

.community-company-contacts-social-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.community-company-contacts-service-emoji {
    width: 1.1rem;
    text-align: center;
    flex: 0 0 1.1rem;
    font-size: 1rem;
    line-height: 1;
}

.community-company-contacts-service[data-bs-toggle="tooltip"] {
    cursor: help;
}

.community-company-service-card-emoji {
    font-size: 1.35rem;
    line-height: 1;
}

.community-company-service-card-title {
    word-break: break-word;
}

.community-company-emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.community-company-emoji-pick-btn {
    min-width: 2rem;
    padding: 0.15rem 0.35rem;
    font-size: 1.1rem;
    line-height: 1.2;
}

.community-company-service-descriptions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.community-company-service-description-row {
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.4rem;
    background: #f8fafc;
}

.community-company-catalog-section .community-company-catalog-editor {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

.community-company-services-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.community-company-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
    color: #1e3a8a;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    cursor: default;
}

.community-company-service-chip-emoji {
    font-size: 0.95rem;
    line-height: 1;
}

.community-company-service-chip[data-bs-toggle="tooltip"] {
    cursor: help;
}

.community-company-repeat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.community-company-repeat-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.4fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.community-company-phone-row {
    grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.4fr) auto auto;
}

.community-company-phone-row .community-company-phone-commercial-wrap {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .community-company-contacts-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .community-company-contacts-logo-col {
        width: min(var(--community-contacts-logo-size), 70vw) !important;
        height: min(var(--community-contacts-logo-size), 70vw) !important;
        aspect-ratio: 1;
    }

    .community-company-contacts-logo {
        width: 100%;
        height: 100%;
    }

    .community-company-repeat-row {
        grid-template-columns: 1fr;
    }
}

.community-page-header-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: min(100%, 18rem);
}

.community-page-header-actions .community-search-wrap {
    flex: 1 1 280px;
    max-width: 360px;
    margin-left: 0;
}

.community-delete-company-posts-btn {
    flex: 0 0 auto;
    line-height: 1;
    padding: 0.35rem 0.55rem;
}

.community-delete-company-posts-btn:disabled {
    pointer-events: none;
}

.community-header-recent-days {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.community-header-recent-days .community-filter-field-label {
    margin: 0;
    white-space: nowrap;
}

.community-header-recent-days .community-filter-inline-control-field {
    min-height: 0;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.community-header-recent-days .community-filter-recent-days-select {
    color: #0f172a;
}

.community-search-wrap {
    flex: 0 1 auto;
    min-width: min(100%, 280px);
    max-width: 360px;
    margin-left: auto;
}

.community-search-input-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem 0.35rem 0.55rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.community-search-icon {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.72;
}

.community-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    box-shadow: none;
    padding: 0.15rem 0;
    background-color: #fff;
}

.community-search-input[readonly] {
    background-color: #fff;
    opacity: 1;
    cursor: text;
}

.community-search-input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.community-search-clear-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.community-search-clear-btn:hover {
    background: rgba(15, 23, 42, 0.14);
    color: #0f172a;
}

.community-search-clear-btn.is-empty {
    opacity: 0.45;
    cursor: default;
}

.community-search-clear-btn.is-empty:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
}

.community-search-status {
    margin-top: -0.35rem;
}

@media (max-width: 767.98px) {
    .community-page-header-actions {
        width: 100%;
        margin-left: 0;
    }

    .community-page-header-actions .community-search-wrap {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
    }

    .community-header-recent-days {
        flex: 1 1 auto;
    }

    .community-search-wrap {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }
}

.community-company-location-tabs .nav-link {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
}

.community-company-location-panels {
    background: #f8fafc;
}

.community-company-location-display {
    padding-left: 0.15rem;
    border-left: 3px solid rgba(59, 130, 246, 0.35);
    padding-bottom: 0.15rem;
}

.community-company-location-panel-inner .community-company-geocode-status.is-ok {
    color: #166534;
}

.community-company-location-panel-inner .community-company-geocode-status.is-failed {
    color: #991b1b;
}

.community-company-location-panel-inner .community-company-geocode-status.is-pending {
    color: #92400e;
}

.form-control.pt-phone-field-error,
.form-select.pt-phone-field-error {
    animation: pt-phone-field-flash 0.5s ease-in-out 2;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.28);
}

@keyframes pt-phone-field-flash {
    0%,
    100% {
        background-color: rgba(220, 53, 69, 0.06);
    }
    50% {
        background-color: rgba(220, 53, 69, 0.2);
    }
}

.company-quote-response-upload-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
}

.company-quote-response-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.company-quote-response-files--preview {
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 0.5rem;
}

.company-quote-response-file-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.5rem;
    background: #fff;
}

a.company-quote-response-file-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.company-quote-response-files--preview .company-quote-response-file-card {
    display: block;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    text-decoration: none;
    color: inherit;
}

.company-quote-response-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.company-quote-response-files--preview .company-quote-response-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    object-fit: cover;
}

.company-quote-response-pdf-frame {
    width: 100%;
    min-height: 280px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.company-quote-response-pdf-object {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.company-quote-response-pdf-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    background: #f8fafc;
    color: #dc3545;
    font-size: 2rem;
}

.company-quote-response-files[data-quote-attachment-gallery] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company-quote-response-files[data-quote-attachment-gallery] .company-quote-response-file-card {
    width: 100px;
    height: 100px;
    max-width: 100%;
    flex: 0 0 auto;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.company-quote-response-files[data-quote-attachment-gallery] .company-quote-response-image {
    width: 100%;
    height: 100px;
    border-radius: 0;
}

.company-quote-response-files[data-quote-attachment-gallery] .company-quote-response-pdf-fallback {
    min-height: 0;
    height: 100px;
    font-size: 2rem;
}

.company-quote-response-file-card--pdf {
    background: #f8fafc;
}

.company-quote-response-file-card--pending {
    position: relative;
}

.company-quote-response-file-card--pending .companies-quote-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.company-quote-response-files--preview .company-quote-response-file-card--pdf .company-quote-response-pdf-fallback {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
}

.company-quote-response-pdf-thumb {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #dc3545;
    background: #fff5f5;
    border-radius: 8px;
}

body.quote-attachment-lightbox-open {
    overflow: hidden;
}

.quote-attachment-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 4.5rem;
}

.quote-attachment-lightbox[hidden] {
    display: none !important;
}

.quote-attachment-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.84);
}

.quote-attachment-lightbox-stage {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 100%;
    text-align: center;
}

.quote-attachment-lightbox-image {
    display: block;
    max-width: min(92vw, 1200px);
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    margin: 0 auto;
}

.quote-attachment-lightbox-caption {
    margin-top: 0.65rem;
    color: #e5e7eb;
    font-size: 0.9rem;
}

.quote-attachment-lightbox-close,
.quote-attachment-lightbox-nav {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.quote-attachment-lightbox-close:hover,
.quote-attachment-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

.quote-attachment-lightbox-close {
    top: 0.85rem;
    right: 0.85rem;
}

.quote-attachment-lightbox-prev {
    left: 0.75rem;
}

.quote-attachment-lightbox-next {
    right: 0.75rem;
}

.quote-attachment-lightbox-nav[hidden] {
    display: none !important;
}

.company-quote-response-header .company-quote-response-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.company-quote-response-header .company-quote-response-logo.placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.4rem;
}

.company-admin-tools-company-select option.company-admin-tools-option-invited {
    background-color: #d1e7dd;
    color: #0f5132;
}

.company-admin-invite-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-admin-invite-legend-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
}

.company-admin-invite-history-table .badge {
    font-weight: 600;
}

.company-admin-invite-status-active {
    background-color: #cfe2ff;
    color: #084298;
}

.company-admin-invite-status-claimed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.company-admin-invite-status-expired {
    background-color: #f8d7da;
    color: #842029;
}

.company-admin-invite-status-used {
    background-color: #e2e3e5;
    color: #41464b;
}

.company-admin-profile-change-list {
    padding-left: 1rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

.company-admin-profile-change-list li + li {
    margin-top: 0.15rem;
}

.company-admin-profile-change-table td {
    vertical-align: top;
}

/* Company dedupe admin modal — ~30% narrower than Bootstrap modal-xl (1140px). */
.modal-dialog.community-company-dedupe-modal {
    max-width: 798px;
}

.community-company-dedupe-modal .company-dedupe-list {
    max-height: min(60vh, 640px);
    overflow: auto;
}

.community-company-dedupe-modal .company-dedupe-dup-list {
    display: grid;
    gap: 0.65rem;
}

.community-company-dedupe-modal .company-dedupe-dup-item {
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 0.4rem;
    padding: 0.55rem 0.7rem;
    background: rgba(220, 53, 69, 0.04);
}

.community-company-dedupe-modal .company-dedupe-keep a,
.community-company-dedupe-modal .company-dedupe-dup-item a {
    word-break: break-all;
}

.admin-portfolio-review-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8f9fa;
}

.message-template-chip {
    cursor: grab;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
}

.message-template-chip:active {
    cursor: grabbing;
}

.message-template-field.message-template-drop-target,
textarea.message-template-field.message-template-drop-target,
input.message-template-field.message-template-drop-target {
    outline: 2px solid rgba(102, 126, 234, 0.45);
    outline-offset: 1px;
}

.message-template-field-wrap {
    position: relative;
}

.message-template-field-wrap > .message-template-field-highlight {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: var(--bs-border-radius, 0.375rem);
    pointer-events: none;
    overflow: hidden;
    margin: 0;
    color: var(--bs-body-color, #212529);
    z-index: 0;
}

.message-template-field-wrap > .message-template-field-highlight.message-template-field-highlight-single {
    white-space: pre;
    overflow-x: hidden;
}

.message-template-field-wrap > .message-template-field-highlight .message-template-token {
    display: inline;
    font-weight: inherit;
    color: #4c51bf;
}

.message-template-field-wrap > .message-template-field.message-template-highlighted {
    position: relative;
    z-index: 1;
    background-color: transparent;
    color: transparent;
    -webkit-text-fill-color: transparent;
    caret-color: var(--bs-body-color, #212529);
}

.message-template-field-wrap > .message-template-field.message-template-highlighted::selection {
    background-color: rgba(102, 126, 234, 0.22);
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.message-template-field-wrap > .message-template-field.message-template-highlighted::placeholder {
    color: var(--bs-secondary-color, #6c757d);
    opacity: 1;
}

.message-template-field-wrap > textarea.message-template-field.message-template-highlighted {
    min-height: 8rem;
    resize: vertical;
    overflow-x: hidden;
    box-sizing: border-box;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
}

.message-template-field-wrap.message-template-field-expanded > textarea.message-template-field.message-template-highlighted {
    min-height: 12rem;
}

.message-template-field-wrap > .message-template-field-highlight:not(.message-template-field-highlight-single) {
    overflow: hidden;
}

