/* /assets/css/community.css */

:root {
--hc-community-bg: #fff7fb;
--hc-community-card: #ffffff;
--hc-community-text: #211827;
--hc-community-muted: #7a6e82;
--hc-community-border: rgba(80, 48, 96, 0.14);
--hc-community-primary: #e91e63;
--hc-community-primary-dark: #bf1450;
--hc-community-soft: #fde7f1;
--hc-community-warning: #fff3cd;
--hc-community-radius: 22px;
--hc-community-shadow: 0 18px 45px rgba(61, 27, 68, 0.10);
}

.hc-community-page {
min-height: 100vh;
padding: 32px 18px 60px;
background:
radial-gradient(circle at top left, rgba(233, 30, 99, 0.14), transparent 34%),
linear-gradient(180deg, #fff7fb 0%, #ffffff 72%);
color: var(--hc-community-text);
}

.hc-community-hero,
.hc-community-layout,
.hc-form-shell,
.hc-thread-view {
width: min(1180px, 100%);
margin: 0 auto;
}

.hc-community-hero {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
padding: 34px;
border: 1px solid var(--hc-community-border);
border-radius: 30px;
background: linear-gradient(135deg, #ffffff 0%, #fff0f6 100%);
box-shadow: var(--hc-community-shadow);
margin-bottom: 24px;
}

.hc-community-kicker {
display: inline-flex;
margin-bottom: 10px;
font-size: 13px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--hc-community-primary);
}

.hc-community-hero h1,
.hc-form-head h1,
.hc-thread-full h1 {
margin: 0 0 10px;
font-weight: 900;
line-height: 1.08;
}

.hc-community-hero h1 {
font-size: clamp(32px, 5vw, 56px);
}

.hc-community-hero p,
.hc-form-head p {
max-width: 680px;
margin: 0;
color: var(--hc-community-muted);
font-size: 17px;
}

.hc-community-layout {
display: grid;
grid-template-columns: 300px minmax(0, 1fr);
gap: 22px;
}

.hc-card,
.hc-thread-card,
.hc-empty-card,
.hc-form-shell,
.hc-thread-full,
.hc-reply-card,
.hc-reply-form-card,
.hc-admin-card {
border: 1px solid var(--hc-community-border);
border-radius: var(--hc-community-radius);
background: var(--hc-community-card);
box-shadow: var(--hc-community-shadow);
}

.hc-card {
padding: 18px;
position: sticky;
top: 20px;
}

.hc-card-title {
margin-bottom: 12px;
font-weight: 900;
font-size: 18px;
}

.hc-category-link {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 14px;
margin-bottom: 8px;
border-radius: 16px;
color: var(--hc-community-text);
text-decoration: none;
background: #fff;
border: 1px solid transparent;
}

.hc-category-link:hover,
.hc-category-link.is-active {
border-color: rgba(233, 30, 99, 0.25);
background: var(--hc-community-soft);
color: var(--hc-community-primary-dark);
}

.hc-category-link strong {
min-width: 30px;
padding: 3px 8px;
border-radius: 999px;
background: #fff;
text-align: center;
font-size: 12px;
}

.hc-community-search {
display: flex;
gap: 10px;
margin-bottom: 16px;
}

.hc-community-search input,
.hc-thread-form input,
.hc-thread-form select,
.hc-thread-form textarea,
.hc-admin-form input,
.hc-admin-form textarea {
width: 100%;
border: 1px solid var(--hc-community-border);
border-radius: 16px;
padding: 13px 15px;
background: #fff;
color: var(--hc-community-text);
outline: none;
}

.hc-community-search button,
.hc-btn {
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 999px;
padding: 12px 20px;
font-weight: 800;
text-decoration: none;
cursor: pointer;
white-space: nowrap;
}

.hc-community-search button,
.hc-btn-primary {
background: var(--hc-community-primary);
color: #fff;
}

.hc-community-search button:hover,
.hc-btn-primary:hover {
background: var(--hc-community-primary-dark);
color: #fff;
}

.hc-btn-light {
background: #fff;
color: var(--hc-community-primary-dark);
border: 1px solid var(--hc-community-border);
}

.hc-thread-list {
display: grid;
gap: 14px;
}

.hc-thread-card {
display: grid;
grid-template-columns: 62px minmax(0, 1fr);
gap: 16px;
padding: 18px;
}

.hc-thread-avatar img,
.hc-thread-author img {
width: 54px;
height: 54px;
border-radius: 18px;
object-fit: cover;
border: 2px solid #fff;
box-shadow: 0 8px 20px rgba(52, 31, 58, 0.12);
}

.hc-thread-meta,
.hc-thread-footer,
.hc-thread-full-meta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 9px;
color: var(--hc-community-muted);
font-size: 13px;
}

.hc-thread-meta a {
color: var(--hc-community-primary-dark);
font-weight: 800;
text-decoration: none;
}

.hc-thread-card h2 {
margin: 8px 0;
font-size: 22px;
line-height: 1.2;
}

.hc-thread-card h2 a {
color: var(--hc-community-text);
text-decoration: none;
}

.hc-thread-card h2 a:hover {
color: var(--hc-community-primary);
}

.hc-thread-card p {
margin: 0 0 12px;
color: var(--hc-community-muted);
}

.hc-chip {
display: inline-flex;
align-items: center;
padding: 4px 9px;
border-radius: 999px;
background: #f1eef5;
color: #5b5063;
font-size: 12px;
font-weight: 800;
}

.hc-chip-pinned {
background: #fff1c7;
color: #8a6100;
}

.hc-empty-card {
padding: 30px;
text-align: center;
}

.hc-empty-card h2 {
margin: 0 0 8px;
}

.hc-empty-card p {
color: var(--hc-community-muted);
}

.hc-form-shell {
padding: 28px;
}

.hc-form-head {
margin-bottom: 20px;
}

.hc-back-link {
display: inline-flex;
margin-bottom: 12px;
color: var(--hc-community-primary-dark);
font-weight: 800;
text-decoration: none;
}

.hc-thread-form {
display: grid;
gap: 16px;
}

.hc-thread-form label,
.hc-admin-form label {
display: grid;
gap: 7px;
font-weight: 800;
}

.hc-thread-form label span,
.hc-admin-form label span {
color: var(--hc-community-text);
}

.hc-form-actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
}

.hc-alert {
padding: 14px 16px;
border-radius: 16px;
margin-bottom: 16px;
border: 1px solid transparent;
}

.hc-alert-danger {
background: #fff0f0;
border-color: #ffd0d0;
color: #9c1c1c;
}

.hc-alert-success {
background: #edfff4;
border-color: #b7f0cc;
color: #146b34;
}

.hc-alert-warning {
background: var(--hc-community-warning);
border-color: #ffe08a;
color: #725100;
}

.hc-thread-view-top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
margin-bottom: 12px;
}

.hc-thread-full,
.hc-reply-card,
.hc-reply-form-card {
padding: 24px;
margin-bottom: 16px;
}

.hc-thread-author {
display: flex;
align-items: center;
gap: 12px;
}

.hc-thread-author strong {
display: block;
}

.hc-thread-author span {
color: var(--hc-community-muted);
font-size: 13px;
}

.hc-thread-full-meta {
margin-top: 16px;
}

.hc-thread-full h1 {
margin-top: 16px;
font-size: clamp(28px, 4vw, 46px);
}

.hc-thread-body,
.hc-reply-body {
color: #33283a;
line-height: 1.7;
font-size: 16px;
}

.hc-replies h2,
.hc-reply-form-card h2 {
margin: 24px 0 14px;
}

.hc-admin-community {
padding: 24px;
}

.hc-admin-card {
padding: 20px;
}

.hc-admin-grid {
display: grid;
grid-template-columns: 380px minmax(0, 1fr);
gap: 20px;
}

.hc-admin-form {
display: grid;
gap: 14px;
}

.hc-check-row {
display: flex !important;
grid-template-columns: auto 1fr;
align-items: center;
gap: 10px !important;
}

.hc-check-row input {
width: auto;
}

.hc-admin-actions {
display: inline-flex;
gap: 7px;
flex-wrap: wrap;
justify-content: flex-end;
}

.hc-admin-actions form {
display: inline;
}

.hc-admin-table .is-muted-row {
opacity: 0.58;
}

@media (prefers-color-scheme: dark) {
:root {
--hc-community-bg: #161019;
--hc-community-card: #211827;
--hc-community-text: #fff8fc;
--hc-community-muted: #c8b9cd;
--hc-community-border: rgba(255, 255, 255, 0.12);
--hc-community-soft: rgba(233, 30, 99, 0.18);
--hc-community-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.hc-community-page {
background:
radial-gradient(circle at top left, rgba(233, 30, 99, 0.22), transparent 34%),
linear-gradient(180deg, #160f19 0%, #0f0b12 100%);
}

.hc-community-hero {
background: linear-gradient(135deg, #211827 0%, #2a1827 100%);
}

.hc-category-link,
.hc-community-search input,
.hc-thread-form input,
.hc-thread-form select,
.hc-thread-form textarea,
.hc-admin-form input,
.hc-admin-form textarea,
.hc-btn-light {
background: #18111d;
color: var(--hc-community-text);
}

.hc-thread-body,
.hc-reply-body {
color: #f7eef9;
}
}

@media (max-width: 860px) {
.hc-community-page {
padding: 18px 12px 42px;
}

.hc-community-hero {
flex-direction: column;
align-items: flex-start;
padding: 24px;
border-radius: 24px;
}

.hc-community-layout,
.hc-admin-grid {
grid-template-columns: 1fr;
}

.hc-card {
position: static;
}

.hc-community-search {
flex-direction: column;
}

.hc-thread-card {
grid-template-columns: 1fr;
}

.hc-thread-avatar {
display: none;
}

.hc-thread-view-top {
align-items: flex-start;
flex-direction: column;
}
}
/* Better spacing + card separation for thread view */

.hc-thread-view {
padding-top: 28px;
padding-bottom: 70px;
}

.hc-thread-full,
.hc-reply-card,
.hc-reply-form-card,
.hc-empty-card {
background: rgba(255, 255, 255, 0.96);
border: 1px solid rgba(233, 30, 99, 0.14);
box-shadow:
0 18px 45px rgba(42, 20, 54, 0.08),
0 2px 8px rgba(42, 20, 54, 0.05);
}

.hc-thread-full {
margin-bottom: 34px;
padding: 30px;
}

.hc-replies {
margin-top: 10px;
margin-bottom: 28px;
}

.hc-replies h2 {
margin: 0 0 16px;
padding-left: 4px;
font-size: 26px;
font-weight: 900;
}

.hc-empty-card {
margin-bottom: 28px;
padding: 36px 28px;
}

.hc-reply-form-card {
margin-top: 30px;
padding: 30px;
}

.hc-thread-author {
padding-bottom: 18px;
margin-bottom: 18px;
border-bottom: 1px solid rgba(80, 48, 96, 0.10);
}

.hc-thread-full-meta {
margin-bottom: 16px;
}

.hc-thread-body,
.hc-reply-body {
padding-top: 8px;
font-size: 17px;
}

.hc-thread-form textarea {
min-height: 150px;
resize: vertical;
}

.hc-thread-form button[type="submit"] {
margin-top: 8px;
width: auto;
min-width: 180px;
}

@media (max-width: 768px) {
.hc-thread-view {
padding-top: 18px;
}

.hc-thread-full,
.hc-reply-card,
.hc-reply-form-card,
.hc-empty-card {
padding: 22px;
border-radius: 20px;
}

.hc-thread-full h1 {
font-size: 30px;
}

.hc-thread-form button[type="submit"] {
width: 100%;
}
}
/* Give community pages better page height */
.hc-community-page {
min-height: calc(100vh - 220px);
padding-bottom: 120px;
}

.hc-community-main {
min-height: 420px;
}

.hc-thread-list {
margin-bottom: 60px;
}

/* Cleaner thread card separation */
.hc-thread-card {
border-color: rgba(233, 30, 99, 0.12);
box-shadow:
0 14px 35px rgba(42, 20, 54, 0.07),
0 2px 8px rgba(42, 20, 54, 0.04);
}

.hc-thread-card:hover {
transform: translateY(-2px);
box-shadow:
0 22px 50px rgba(42, 20, 54, 0.11),
0 4px 12px rgba(42, 20, 54, 0.06);
}
/* ------------------------------------------------------------
   Day / Night mode support
------------------------------------------------------------ */

/* Light mode */
html[data-theme="light"] .hc-community-page {
    background:
        radial-gradient(circle at top left, rgba(233, 30, 99, 0.12), transparent 34%),
        linear-gradient(180deg, #fff7fb 0%, #ffffff 72%);
    color: #211827;
}

html[data-theme="light"] .hc-community-hero,
html[data-theme="light"] .hc-card,
html[data-theme="light"] .hc-thread-card,
html[data-theme="light"] .hc-thread-full,
html[data-theme="light"] .hc-reply-card,
html[data-theme="light"] .hc-reply-form-card,
html[data-theme="light"] .hc-empty-card,
html[data-theme="light"] .hc-form-shell {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(80, 48, 96, 0.14);
    color: #211827;
}

/* Dark mode */
html[data-theme="dark"] .hc-community-page {
    background:
        radial-gradient(circle at top left, rgba(233, 30, 99, 0.18), transparent 36%),
        linear-gradient(180deg, #17101d 0%, #0f0b12 100%);
    color: #fff7fc;
}

html[data-theme="dark"] .hc-community-hero,
html[data-theme="dark"] .hc-card,
html[data-theme="dark"] .hc-thread-card,
html[data-theme="dark"] .hc-thread-full,
html[data-theme="dark"] .hc-reply-card,
html[data-theme="dark"] .hc-reply-form-card,
html[data-theme="dark"] .hc-empty-card,
html[data-theme="dark"] .hc-form-shell {
    background: rgba(33, 24, 39, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff7fc;
}

html[data-theme="dark"] .hc-community-hero p,
html[data-theme="dark"] .hc-thread-card p,
html[data-theme="dark"] .hc-thread-footer,
html[data-theme="dark"] .hc-thread-meta,
html[data-theme="dark"] .hc-thread-author span,
html[data-theme="dark"] .hc-thread-full-meta,
html[data-theme="dark"] .hc-empty-card p,
html[data-theme="dark"] .hc-form-head p {
    color: #cdbed6;
}

html[data-theme="dark"] .hc-thread-card h2 a,
html[data-theme="dark"] .hc-thread-full h1,
html[data-theme="dark"] .hc-replies h2,
html[data-theme="dark"] .hc-reply-form-card h2,
html[data-theme="dark"] .hc-card-title,
html[data-theme="dark"] .hc-thread-form label span {
    color: #fff7fc;
}

html[data-theme="dark"] .hc-thread-body,
html[data-theme="dark"] .hc-reply-body {
    color: #f5edf8;
}

html[data-theme="dark"] .hc-category-link,
html[data-theme="dark"] .hc-community-search input,
html[data-theme="dark"] .hc-thread-form input,
html[data-theme="dark"] .hc-thread-form select,
html[data-theme="dark"] .hc-thread-form textarea {
    background: #18111d;
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff7fc;
}

html[data-theme="dark"] .hc-category-link:hover,
html[data-theme="dark"] .hc-category-link.is-active {
    background: rgba(233, 30, 99, 0.18);
    border-color: rgba(233, 30, 99, 0.35);
    color: #ff8bb9;
}

html[data-theme="dark"] .hc-category-link strong {
    background: rgba(255, 255, 255, 0.08);
    color: #fff7fc;
}

html[data-theme="dark"] .hc-chip {
    background: rgba(255, 255, 255, 0.10);
    color: #f5edf8;
}

html[data-theme="dark"] .hc-chip-pinned {
    background: rgba(255, 193, 7, 0.18);
    color: #ffd96a;
}

html[data-theme="dark"] .hc-btn-light {
    background: #18111d;
    border-color: rgba(255, 255, 255, 0.14);
    color: #ff8bb9;
}

/* WhatsApp green theme support */
html[data-theme="whatsapp"] .hc-community-page {
    background:
        radial-gradient(circle at top left, rgba(37, 211, 102, 0.14), transparent 34%),
        linear-gradient(180deg, #f3fff7 0%, #ffffff 72%);
}

html[data-theme="whatsapp"] .hc-community-kicker,
html[data-theme="whatsapp"] .hc-thread-meta a,
html[data-theme="whatsapp"] .hc-back-link {
    color: #128c4a;
}

html[data-theme="whatsapp"] .hc-btn-primary,
html[data-theme="whatsapp"] .hc-community-search button {
    background: #25d366;
    color: #ffffff;
}

html[data-theme="whatsapp"] .hc-btn-primary:hover,
html[data-theme="whatsapp"] .hc-community-search button:hover {
    background: #128c4a;
}

html[data-theme="whatsapp"] .hc-category-link:hover,
html[data-theme="whatsapp"] .hc-category-link.is-active {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.35);
    color: #128c4a;
}
/* ------------------------------------------------------------
   Community stats
------------------------------------------------------------ */

.hc-community-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.hc-community-stats div {
    min-width: 120px;
    padding: 14px 18px;
    border: 1px solid rgba(233, 30, 99, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 26px rgba(42, 20, 54, 0.06);
}

.hc-community-stats strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    color: #e91e63;
}

.hc-community-stats span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #75677d;
}

html[data-theme="dark"] .hc-community-stats div {
    background: rgba(24, 17, 29, 0.82);
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .hc-community-stats strong {
    color: #ff8bb9;
}

html[data-theme="dark"] .hc-community-stats span {
    color: #cdbed6;
}

html[data-theme="whatsapp"] .hc-community-stats strong {
    color: #25d366;
}

html[data-theme="whatsapp"] .hc-community-stats div {
    border-color: rgba(37, 211, 102, 0.22);
}
/* Emoji picker for thread forms */

.hc-emoji-field {
    position: relative;
}

.hc-emoji-field textarea {
    padding-right: 54px;
}

.hc-emoji-toggle {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(233, 30, 99, 0.12);
    cursor: pointer;
    font-size: 20px;
}

.hc-emoji-panel {
    position: absolute;
    right: 12px;
    top: 56px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 36px);
    gap: 6px;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(80, 48, 96, 0.14);
    box-shadow: 0 18px 40px rgba(42, 20, 54, 0.16);
}

.hc-emoji-panel button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}

.hc-emoji-panel button:hover {
    background: rgba(233, 30, 99, 0.10);
}

html[data-theme="dark"] .hc-emoji-panel {
    background: #211827;
    border-color: rgba(255, 255, 255, 0.12);
}
.hc-thread-author strong a {
    color: inherit;
    text-decoration: none;
    font-weight: 800;
}

.hc-thread-author strong a:hover {
    color: #e91e63;
    text-decoration: underline;
}

html[data-theme="whatsapp"] .hc-thread-author strong a:hover {
    color: #25d366;
}
/* Top contributors */

.hc-top-contributors {
    margin-top: 16px;
}

.hc-top-person {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-top: 8px;
    border-radius: 14px;
    background: rgba(233, 30, 99, 0.06);
    color: inherit;
    text-decoration: none;
}

.hc-top-person:hover {
    background: rgba(233, 30, 99, 0.12);
}

.hc-top-rank {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(233, 30, 99, 0.14);
    color: #e91e63;
    font-size: 12px;
    font-weight: 900;
}

.hc-top-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.hc-top-person strong {
    color: #e91e63;
    font-size: 13px;
}

html[data-theme="dark"] .hc-top-person {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .hc-top-person:hover {
    background: rgba(255, 255, 255, 0.10);
}

html[data-theme="whatsapp"] .hc-top-rank,
html[data-theme="whatsapp"] .hc-top-person strong {
    color: #25d366;
}

html[data-theme="whatsapp"] .hc-top-rank {
    background: rgba(37, 211, 102, 0.14);
}

html[data-theme="whatsapp"] .hc-top-person:hover {
    background: rgba(37, 211, 102, 0.10);
}
/* Community reports */

.hc-report-box {
    margin-top: 18px;
    border-top: 1px solid rgba(80, 48, 96, 0.10);
    padding-top: 14px;
}

.hc-report-box summary {
    width: fit-content;
    cursor: pointer;
    color: #9b6475;
    font-size: 13px;
    font-weight: 800;
}

.hc-report-form {
    display: grid;
    gap: 12px;
    max-width: 520px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(233, 30, 99, 0.055);
    border: 1px solid rgba(233, 30, 99, 0.12);
}

.hc-report-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
}

.hc-report-form select,
.hc-report-form textarea {
    width: 100%;
    padding: 11px 13px;
    border-radius: 13px;
    border: 1px solid rgba(80, 48, 96, 0.16);
    background: #fff;
    color: #211827;
}

html[data-theme="dark"] .hc-report-box {
    border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .hc-report-form {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .hc-report-form select,
html[data-theme="dark"] .hc-report-form textarea {
    background: #18111d;
    color: #fff7fc;
    border-color: rgba(255, 255, 255, 0.14);
}