/* ── Shared hashtag chip (article detail + blog/search cards) ─────────────── */
.hashtag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0;
}

.hashtag-chip {
    display: inline-block;
    color: #393939;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

a.hashtag-chip:hover {
    color: #111;
    font-weight: 700;
}

.article-hashtags {
    margin: 0px 0 24px 0;
    padding: 0 16px;
}

/* ── Editor hashtag chip ──────────────────────────────────────────────────── */
.hashtag-input-section {
    margin: 0 0 24px 0;
    padding: 0 16px;
    position: relative;
}

/* Chips + input live in a single flex row */
.hashtag-input-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    position: relative;
}

.hashtag-chips-editor {
    display: contents; /* chips flow directly into the parent flex row */
}

.hashtag-chip--editor {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #393939;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.hashtag-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: #777;
    padding: 0;
    margin-left: 0;
}
.hashtag-chip-remove:hover { color: #111; }

#hashtagInput {
    border: none;
    outline: none;
    font-size: 0.9rem;
    padding: 4px 2px;
    min-width: 120px;
    background: transparent;
    font-family: inherit;
}
#hashtagInput.hashtag-input--error { color: #e03; animation: hashtagShake 0.15s ease 2; }

@keyframes hashtagShake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

.hashtag-limit-note {
    font-size: 0.78rem;
    color: #393939;
    margin-top: 4px;
}

/* ── Autocomplete dropdown (shared by editor, blog, search) ───────────────── */
.hashtag-autocomplete-dropdown {
    position: absolute;
    z-index: 200;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    min-width: 180px;
    max-width: 260px;
    overflow: hidden;
}

.hashtag-dropdown-item {
    padding: 9px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    color: #222;
    transition: background 0.1s;
}
.hashtag-dropdown-item:hover,
.hashtag-dropdown-item--active { background: #f5f5f5; }

/* ── Blog search — hashtag keyword tag ───────────────────────────────────── */
.keyword-tag--hashtag {
    background: #222;
    color: #fff;
}
.keyword-tag--hashtag .keyword-tag-remove { color: #ccc; }
.keyword-tag--hashtag .keyword-tag-remove:hover { color: #fff; }

.keyword-search-box {
    position: relative;
}

/* ── Search page — token chips inside the search bar ─────────────────────── */
#searchTokensWrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#searchTokensWrap::-webkit-scrollbar { display: none; }

#searchTokens {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    flex-shrink: 0;
}

#searchInput {
    flex-shrink: 0;
    min-width: 80px;
}

.search-token {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 16px;
    background: #f0f0f0;
    color: #393939;
    font-size: 0.80rem;
    font-weight: 600;
    white-space: nowrap;
}

.search-token--hashtag {
    background: #222;
    color: #fff;
}

.search-token-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    color: #393939;
    padding: 0;
    margin-left: 2px;
}
.search-token--hashtag .search-token-remove { color: #aaa; }
.search-token-remove:hover { color: #333; }
.search-token--hashtag .search-token-remove:hover { color: #fff; }

#searchBarRow {
    position: relative;
}

#searchHashtagDropdown {
    top: calc(100% + 6px);
    left: 40px;
}
