.hq-editor-wrapper {
    --editor-dark: #3f4a1e;
    --editor-dark-2: #4b5320;
    --editor-accent: #8fae3a;
    --editor-light: #eef0e6;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

.hq-editor {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border: 1px solid var(--editor-dark);
}

.hq-editor-header {
    background-color: var(--editor-dark);
    color: #fff;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.hq-editor-toolbar-row {
    background-color: var(--editor-dark-2);
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.hq-btn {
    background-color: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.15s;
}
.hq-btn:hover { background-color: rgba(255,255,255,0.2); }
.hq-btn.active { background-color: var(--editor-accent); color: #1e2410; }

.hq-btn-text { width: auto; padding: 0 10px; font-weight: 700; font-size: 0.8rem; }

.hq-sep {
    width: 1px;
    height: 22px;
    background-color: rgba(255,255,255,0.2);
    margin: 0 4px;
}

.hq-color-input {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    background: none;
}

.hq-font-select {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.8rem;
}
.hq-font-select option { color: #000; }

.hq-editor-content {
    background-color: var(--editor-light);
    color: #2b2b23;
    min-height: 280px;
    max-height: 520px;
    overflow-y: auto;
    padding: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.hq-editor-content:focus { outline: none; }
.hq-editor-content:empty::before {
    content: attr(data-placeholder);
    color: #9a9a8c;
}
.hq-editor-content img,
.hq-editor-content iframe.post-video-embed {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px 0;
    border-radius: 4px;
}
.hq-editor-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
}
.hq-editor-content table td {
    border: 1px solid #b9bfa8;
    padding: 6px 8px;
    min-width: 40px;
}
.hq-editor-content blockquote {
    border-left: 3px solid var(--editor-dark-2);
    margin: 8px 0;
    padding: 4px 12px;
    color: #4b5320;
    font-style: italic;
}
.hq-editor-content pre {
    background-color: #262c14;
    color: #e8e8d8;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}
.hq-editor-content code { background-color: rgba(0,0,0,0.08); padding: 1px 4px; border-radius: 3px; }
.hq-editor-content .mention {
    color: #1b4d1b;
    font-weight: 700;
    text-decoration: none;
}
.hq-editor-content .mention:hover { text-decoration: underline; }

/* Inside the live editor specifically (not published post display), add a
   highlight pill so a tagged mention is easy to spot while composing. */
.hq-editor .hq-editor-content .mention {
    background-color: #dfe6c8;
    padding: 0 4px;
    border-radius: 3px;
}
.hq-editor-content ul.hq-checklist { list-style: none; padding-left: 4px; }
.hq-editor-content ul.hq-checklist li { position: relative; padding-left: 24px; }
.hq-editor-content ul.hq-checklist li::before {
    content: '☐';
    position: absolute;
    left: 0;
    cursor: pointer;
}
.hq-editor-content ul.hq-checklist li.checked::before { content: '☑'; }
.hq-editor-content ul.hq-checklist li.checked { text-decoration: line-through; color: #757575; }

.hq-editor-statusbar {
    background-color: var(--editor-dark);
    color: #d8dcc4;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
}
.hq-status-link { background: none; border: none; color: #d8dcc4; cursor: pointer; font-size: 0.8rem; }
.hq-status-link:hover { color: #fff; }
.hq-sep-v { width: 1px; height: 16px; background-color: rgba(255,255,255,0.2); }
.hq-lang-label { display: flex; align-items: center; gap: 4px; }
.hq-editor-language-select {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.78rem;
}
.hq-editor-language-select option { color: #000; }

.hq-editor-preview {
    background-color: #fff;
    border: 1px dashed var(--editor-dark-2);
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
}

.hq-editor-dropzone {
    margin-top: 10px;
    border: 2px dashed #9aa584;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    color: #5a6140;
    background-color: #f5f6ef;
    transition: background-color 0.15s;
}
.hq-editor-dropzone.dragover { background-color: #e4e9d3; }
.hq-dropzone-inner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hq-dropzone-icon { font-size: 1.2rem; }
.hq-image-count {
    background-color: var(--editor-dark-2);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

.hq-editor-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hq-draft-status { font-size: 0.75rem; font-weight: 400; color: #d8dcc4; }

/* Reply banner (WhatsApp/Messenger-style) */
.hq-reply-banner {
    display: flex;
    align-items: stretch;
    background-color: #eef0e6;
    border-radius: 6px 6px 0 0;
    margin-bottom: -1px;
    overflow: hidden;
}
.hq-reply-banner-bar {
    width: 4px;
    background-color: var(--editor-accent, #8fae3a);
    flex-shrink: 0;
}
.hq-reply-banner-body {
    flex: 1;
    padding: 6px 10px;
    min-width: 0;
}
.hq-reply-banner-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3a4019;
}
.hq-reply-banner-author { color: #3a4019; }
.hq-reply-banner-excerpt {
    font-size: 0.82rem;
    color: #6b6b5c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hq-reply-banner-close {
    background: none;
    border: none;
    color: #6b6b5c;
    padding: 0 12px;
    cursor: pointer;
    font-size: 1rem;
}
.hq-reply-banner-close:hover { color: #c62828; }

/* Quote card — inserted into editor content and shown in published posts.
   Structure: outer <div class="quote-card"> (not a link) containing an
   <a class="quote-card-link"> for the clickable jump-to-post area, a
   sibling <button class="quote-toggle"> (buttons can't nest inside <a>),
   and a <div class="quote-card-full"> that's toggled visible/hidden. */
.quote-card {
    display: block;
    border-left: 4px solid #4b5320;
    background-color: #f5f6ef;
    border-radius: 0 6px 6px 0;
    margin: 8px 0;
    padding: 8px 12px;
}
.quote-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.quote-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}
.quote-card-author {
    font-weight: 700;
    color: #3a4019;
    text-decoration: none;
}
.quote-card-media-icon { font-size: 0.85rem; }
.quote-toggle {
    background: none;
    border: none;
    color: #6b6b5c;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 0;
    display: block;
    margin-top: 4px;
}
.quote-toggle:hover { color: #2b2b23; }
.quote-card-excerpt {
    display: block;
    color: #2b2b23;
    font-size: 0.88rem;
    margin-top: 2px;
}
.quote-card-link:hover .quote-card-excerpt { text-decoration: underline; }
.quote-card-full {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #c2b280;
    font-size: 0.88rem;
}
.quote-card.expanded .quote-card-full { display: block; }
.quote-card.expanded .quote-toggle .quote-toggle-arrow { transform: rotate(180deg); display: inline-block; }

/* Reply backlink shown above a post that was a reply to another post */
.post-reply-backlink {
    font-size: 0.78rem;
    color: #6b6b5c;
    margin-bottom: 6px;
    display: block;
}
.post-reply-backlink:hover { color: #3a4019; }

/* @mention dropdown */
.hq-mention-dropdown {
    position: absolute;
    z-index: 2000;
    background-color: #fff;
    border: 1px solid #c2b280;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 180px;
    max-height: 220px;
    overflow-y: auto;
}
.hq-mention-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hq-mention-item:hover, .hq-mention-item.active {
    background-color: #eef0e6;
}
