/* Компактные стили для якорей заголовков */

/* Якорные ссылки в постах - без стилей */
.forum-content a[href^="#"] {
    color: inherit;
    text-decoration: none;
}

.forum-content a[href^="#"]:hover {
    text-decoration: underline;
}

/* Подсветка заголовков */
.heading-highlight {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0%, 100% { background: transparent; }
    50% { background: #fef3c7; border-radius: 4px; }
}

.dark .heading-highlight {
    animation: highlightDark 2s ease-in-out;
}

@keyframes highlightDark {
    0%, 100% { background: transparent; }
    50% { background: #451a03; border-radius: 4px; }
}

/* Автокомплит заголовков */
.heading-autocomplete-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    min-width: 250px;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dark .heading-autocomplete-dropdown {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.heading-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
}

.dark .heading-autocomplete-item {
    color: #d1d5db;
    border-bottom-color: #374151;
}

.heading-autocomplete-item:hover,
.heading-autocomplete-item.selected {
    background: #f3f4f6;
}

.dark .heading-autocomplete-item:hover,
.dark .heading-autocomplete-item.selected {
    background: #374151;
}

.heading-autocomplete-item:last-child {
    border-bottom: none;
}

.heading-level {
    font-weight: 600;
    color: #6b7280;
    margin-right: 8px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

.dark .heading-level {
    color: #9ca3af;
}
