/* BUNDLE: articles-bundle | Generated: 2026-03-07 20:23:20 | Sources: 6 */

/* --- File: articles.css --- */
/* Стили для списка статей */
.articles-container {
    margin: 20px 0;
    overflow: visible; /* Разрешаем tooltip выходить за границы контейнера */
}

/* Переключатель видов отображения */
button {
    font-family: 'Arial', Helvetica, sans-serif !important;
    /* padding: 8px 8px!important; */
    /* font-size: 16px!important; */

}

i.fas.fa-calendar-alt.date-trigger {
    display: flex;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    flex-direction: row;
}

.left-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: #495057;
    background: rgba(0, 123, 255, 0.1);
}

.view-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3);
}

.view-btn i {
    font-size: 14px;
}

/* Базовые стили карточек статей */
/* Базовые стили карточек статей (структура) */
.article-card {
    display: flex;
    flex-direction: column;
    overflow: visible; /* Разрешаем tooltip выходить за границы карточки */
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card.menu-open {
    z-index: 99999 !important; /* Выводим карточку на самый передний план */
}

/* Вид "Список" (Специфичные стили) */
.articles-container:not(.view-grid-2) .article-card,
.articles-grid .article-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 0;
}

.articles-container:not(.view-grid-2) .article-card:hover,
.articles-grid .article-card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Вид "Список" (по умолчанию) */
.articles-container.view-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.articles-container.view-list .article-card {
    margin-bottom: 0 !important;
    /* width: 100% !important; */
    max-width: 100% !important;
    flex: none !important;
}

div#articles-list>.articles-container.view-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 35px !important;
}

/* Вид "Сетка 2 колонки" (Стабильный Grid) */
.articles-container.view-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    row-gap: 44px !important;
    column-gap: 10px !important;
}

.articles-container.view-grid-2 .article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: none;
    transition: none;
    position: relative;
    overflow: visible; /* Разрешаем выпадающему меню выходить за границы */
    margin-bottom: 0 !important; /* Отступы задаются через grid gap */
}

.articles-container.view-grid-2 .article-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #cbd5e1;
}

/* Заголовок */
.articles-container.view-grid-2 .article-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
}

.article-title.title-in-header {
    margin-top: 0;
    margin-bottom: 5px;
    min-height: auto;
}

.article-title.title-in-header:empty {
    display: none;
}

.articles-container.view-grid-2 .article-title a {
    color: inherit;
    text-decoration: none;
}

.articles-container.view-grid-2 .wiki-label {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: #3b82f6;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
}

.articles-container.view-grid-2 .read-status-icon {
    font-size: 0.8rem;
    color: #10b981;
}

/* Мета */
.articles-container.view-grid-2 .article-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #64748b;
}

.articles-container.view-grid-2 .article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Статистика компактно */
.articles-container.view-grid-2 .article-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0;
    background: transparent;
}

.articles-container.view-grid-2 .stats-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #475569;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
}

.articles-container.view-grid-2 .stats-icon {
    width: 14px;
    height: 14px;
    color: #94a3b8;
}

.articles-container.view-grid-2 .article-rating-display {
    color: #d97706;
}

/* Категории и теги компактно */
.articles-container.view-grid-2 .article-categories,
.articles-container.view-grid-2 .article-tags {
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.articles-container.view-grid-2 .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.articles-container.view-grid-2 .tag {
    padding: 1px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    color: #475569;
}

/* Компактный футер */
.articles-container.view-grid-2 .article-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.articles-container.view-grid-2 .article-read-more-button {
    padding: 6px 14px;
    background: #3b82f6;
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.articles-container.view-grid-2 .article-card-bookmark-container {
    display: flex;
    gap: 4px;
    margin-left: 0 !important;
}

.articles-container.view-grid-2 .bookmark-btn,
.articles-container.view-grid-2 .share-btn,
.articles-container.view-grid-2 .article-more-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

/* Скрываем лишнее */
.articles-container.view-grid-2 .article-preview-image,
.articles-container.view-grid-2 .article-content-body,
.articles-container.view-grid-2 .article-bottom-rating,
.articles-container.view-grid-2 .article-toggle-container {
    display: none !important;
}

/* Стили для тегов в режиме списка */
.articles-container.view.list .article-tags {
    margin-top: 0;
    /*12px;*/
    margin-bottom: 8px;
}

/* Улучшенные стили для грид-видов */
.articles-container.view-grid-2 .article-stats {
    margin-bottom: 5px;
}

/* Улучшенное отображение категорий и тегов в гриде */
.articles-container.view-grid-2 .article-categories {
    margin-bottom: 8px;
}

.articles-container.view-grid-2 .article-tags {
    margin-bottom: 8px;
}

/* Дополнительные стили для тегов в grid-2 */

/* Адаптивность */

@media (max-width: 1080px) {
    .articles-container.view-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .article-card {
        border-radius: 6px;
        padding: 10px;
    }
    .action-buttons {
        align-items: stretch;
    }
    .view-toggle {
        display: none !important;
    }
    .articles-container.view-grid-2 {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .article-meta {
        gap: 10px;
        margin-bottom: 8px;
    }
    .article-meta span {
        gap: 4px;
        font-size: 13px;
    }
    .author-avatar-mini {
        width: 20px;
        height: 20px;
    }
}

.article-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 21px;
		display: flex;
		align-items: center;
		line-height: 1.5rem;
		gap: 5px;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
		font-size: 1.5rem;
}

.article-title a:hover {
    color: #3498db;
}

.article-meta {
    margin-bottom: 5px;
    color: #7f8c8d;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-meta i[data-tooltip] {
    cursor: help;
    transition: transform 0.2s ease;
}

.article-meta i[data-tooltip]:hover {
    transform: scale(1.2);
    color: #3498db;
}

.article-author a {
    color: #3498db;
    text-decoration: none;
}

.article-author a:hover {
    text-decoration: underline;
}

.article-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
    align-items: center;
}

.stats-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #7f8c8d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.stats-icon {
    color: #7f8c8d;
    font-size: 16px;
    transition: all 0.2s ease;
}

.stats-item:hover {
    color: #3498db;
    text-decoration: none;
}

.stats-item:hover .stats-icon {
    color: #3498db;
}

.article-excerpt {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

.article-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
}

.article-card-bookmark-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; /* В списке прижимаем вправо */
}

.container {
    padding: 0px;
}

/* Стили для полной статьи */
.full-article {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.article-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.article-header h1 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 32px;
}

.article-content {
    line-height: 24px;
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-footer {
    margin-top: 10px;
		padding-top: 10px;
    border-top: 1px solid #eee;
}

.title-counter {
    margin-top: 5px;
}

/* Стили для формы создания/редактирования статьи */
.article-form {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 20px;
}

.article-form .form-group {
    margin-bottom: 20px;

}

.article-form label {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 0;
    color: #2c3e50;
}

.article-form input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
		line-height: 1.6;
}

.article-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
}

.article-form small {
    display: block;
    color: #7f8c8d;
    margin-top: 5px;
}

.char-counter {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
    margin-bottom: 8px;
    text-align: right;
}

.char-counter #comment-char-count {
    font-weight: bold;
}

.char-counter.title-counter {
    margin-top: 5px;
    text-align: left;
}

.char-counter.over-limit {
    color: #e74c3c;
    font-weight: 600;
}

.char-counter.near-limit {
    color: #f39c12;
    font-weight: 500;
}

/* Кнопки для статей */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    /* flex-wrap: wrap; */
    align-items: baseline;
}

.container>.action-buttons {
    flex-wrap: nowrap;
    margin-bottom: 10px;
    gap: 8px;
}

.container>.action-buttons>a.button-primary {
    padding: 4px 8px;
}

.action-buttons .button-primary,
.action-buttons .button-secondary {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.action-buttons .button-primary {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
}

.action-buttons .button-primary:hover {
    background-color: #218838;
}

/* Стили для ссылок на авторов */

.action-buttons .button-secondary:hover {
    background-color: #e5e7eb;
		color: #000000 !important;
}

/* Новые стили для кнопок в виде иконок */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    color: #6c757d;
    margin-right: 5px;
    text-decoration: none;
    /* Добавляем для правильного отображения ссылок */
}

.action-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    /* Убедимся, что SVG иконки не заполнены */
}

.action-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
		color: #666666;
}

/* Новые стили для выпадающего меню "..." */
.article-more-actions {
    position: relative;
    display: inline-block;
}

.article-more-btn {
    background: none;
    border: none;
    color: #6c757d;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}

.article-more-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

.article-more-dropdown {
    position: absolute;
    bottom: 100%;
    left: var(--menu-left, 0);
    right: auto;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 6px 0;
    z-index: 1001; /* Повышаем z-index */
    display: none;
    border: 1px solid #eee;
    margin-bottom: 8px;
    animation: fadeInScaleUp 0.15s ease-out;
}

.article-more-dropdown.dropdown-bottom {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    animation: fadeInScaleDown 0.15s ease-out;
}

/* Треугольник для меню "..." */
.article-more-dropdown::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: var(--arrow-x, 11px);
    width: 12px;
    height: 12px;
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.article-more-dropdown.dropdown-bottom::after {
    bottom: auto;
    top: -6px;
    border-right: none;
    border-bottom: none;
    border-left: 1px solid #eee;
    border-top: 1px solid #eee;
}

@keyframes fadeInScaleUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInScaleDown {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.article-more-dropdown.show {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    border: none;
    background: none;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.dropdown-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.dropdown-item.edit-link i {
    color: #3498db;
}

.dropdown-item.delete-link {
    color: #dc3545;
}

.dropdown-item.delete-link i {
    color: #dc3545;
}

.dropdown-item.delete-link:hover {
    background: #fef2f2;
}

/* Группа действий в карточке статьи */
.article-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    overflow: visible; /* Разрешаем tooltip выходить за границы */
}

.article-actions .button-secondary {
    margin-right: 10px;
}

.icon-actions {
    display: flex;
    align-items: center;
}

.label-text-tags-help{
	padding: 5px;
}

/* Стили для категорий статей */
.categories-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 0px solid #e9ecef;
    flex-direction: row;
    flex-wrap: wrap;
}

.category-checkbox {
    position: relative;
    margin-bottom: 0;
}

.category-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

label.category-label {
    margin-bottom: 0;
}

.category-label {
    display: inline-block;
    padding: 6px 8px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #495057;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-checkbox input[type="checkbox"]:checked+.category-label {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.category-checkbox input[type="checkbox"]:focus+.category-label {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.category-checkbox:hover .category-label {
    background-color: #e9ecef;
}

.category-checkbox input[type="checkbox"]:checked:hover+.category-label {
    background-color: #0069d9;
    border-color: #0062cc;
}

.article-categories {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 14px;
}

.categories-label {
    font-weight: 500;
}

.category-tag,
.category-link {
    display: inline-block;
    margin-right: 5px;
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.category-tag:hover,
.category-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Стили для тегов */
.tags-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-tags {
    margin: 10px 0;
    color: #6c757d;
    font-size: 14px;
}

.tags-label {
    font-weight: 500;
}

.tag {
    display: inline-block;
    background-color: #6f42c1;
    color: white;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.tag:hover {
    background-color: #5a2d91;
    color: white;
}

.article-tag-link {
    display: inline-block;
    background-color: #6f42c1;
    color: white;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.article-tag-link:hover {
    background-color: #5a2d91;
    color: white;
    text-decoration: none;
}

.tag-filter-info {
    background-color: #f3e5f5;
    border: 1px solid #ce93d8;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 20px;
    color: #4a148c;
}

.tag-filter-info a {
    color: #6a1b9a;
    text-decoration: underline;
}

/* Стили для комментариев */
.article-comments {
    border-top: 1px solid #eee;
}

.comment-form-container {
    margin-bottom: 30px;
}

.comment-form-container h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 0 solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
}

.comment {
    padding: 12px;
    margin: 5px 0;
    border-radius: 8px;
    background: #fff;
		border: 1px solid #dee2e6;
}
.comment:hover {
		border: 1px solid #3498db;
}

.comment-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-actions .button-secondary {
    margin-right: 10px;
}

.comment-actions .action-btn:last-child {
    margin-right: 0;
}

.comment-actions .action-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.comment-actions .action-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #888;
    stroke-width: 1.8;
    display: block;
    transition: stroke 0.18s;
}

.comment-actions .action-btn:hover svg {
    stroke: #3498db;
}

.comment-actions .action-btn.reply-btn:hover {
    background: #d4edda;
    color: #155724;
}

.comment-actions .action-btn.reply-btn:hover svg { 
    stroke: #28a745; 
}

.comment-actions .action-btn.edit-btn:hover {
    background: #cce5ff;
    color: #004085;
}

.comment-actions .action-btn.edit-btn:hover svg { 
    stroke: #084298; 
}

.comment-actions .action-btn.delete-btn:hover {
    background: #f8d7da;
    color: #721c24;
}

.comment-actions .action-btn.delete-btn:hover svg { 
    stroke: #dc3545; 
}

.comment-actions .action-btn.copy-btn:hover {
    background: #e2e3e5;
    color: #495057;
}

.comment-actions .action-btn.copy-btn:hover svg { 
    stroke: #6c757d; 
} */
/*END*/
.comment-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.comment-rating-value {
    font-weight: bold;
    color: #3498db;
    min-width: 20px;
    text-align: center;
}

.comment-rating button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.comment-rating button:hover {
    background-color: #e5e7eb;
    transform: scale(1.1);
}

.comment-rating-value {
    font-weight: bold;
    color: #3498db;
    min-width: 20px;
    text-align: center;
}

/* Базовые стили для всех кнопок действий */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Специфичные стили для кнопок лайков/дизлайков (основные) */
.like-btn:hover,
.like-btn.active {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.dislike-btn:hover,
.dislike-btn.active {
    border-color: #ef4444;
    background: #ef4444;
    color: white;
}

/* Стили для кнопки ответа */
.reply-btn:hover {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

/* Стили для кнопки редактирования */
.edit-btn:hover {
    border-color: #f59e0b;
    background: #f59e0b;
    color: white;
}

/* Стили для кнопки удаления */
.delete-btn:hover {
    border-color: #ef4444;
    background: #ef4444;
    color: white;
}

/* Стили для кнопки копирования */
.copy-btn:hover {
    border-color: #6b7280;
    background: #6b7280;
    color: white;
}

/* Стили для кнопки жалобы */
.report-btn {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.report-btn:hover {
    background: #ffeeba;
    border-color: #ffdf7e;
}

/* Специальные стили для кнопок голосования в комментариях */
.action-btn.vote-up,
.action-btn.vote-down {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    gap: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-btn.vote-up {
    color: #28a745;
}

.action-btn.vote-down {
    color: #dc3545;
}

.action-btn.vote-up:hover {
    background: #d4edda;
    border-color: #28a745;
    transform: translateY(0px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

.action-btn.vote-down:hover {
    background: #f8d7da;
    border-color: #dc3545;
    transform: translateY(0px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

/* Анимация изменения рейтинга */
@keyframes rating-change-fly {
    0% {
        opacity: 1;
        transform: translateY(0px) scale(1);
        top: 0px;
        left: 50%;
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
        top: -20px;
        left: 50%;
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.8);
        top: -40px;
        left: 50%;
    }
}

.rating-change {
    transform: translateX(-50%);
}

/* Улучшенные состояния кнопок */
.action-btn.vote-up:disabled,
.action-btn.vote-down:disabled {
    cursor: not-allowed;
    opacity: 0.7 !important;
}

/* Эффект подсветки рейтинга при изменении */
.comment-rating-value {
    transition: all 0.3s ease;
}

.comment-rating-value.rating-updated {
    color: #28a745;
    transform: scale(1.1);
    font-weight: bold;
}

/* Анимация для кликов по кнопкам голосования */
.action-btn.vote-up:active,
.action-btn.vote-down:active {
    transform: translateY(0px) scale(0.95);
    transition: all 0.1s ease;
}

.action-btn.vote-up.active:active {
    transform: translateY(0px) scale(0.95);
}

.action-btn.vote-down.active:active {
    transform: translateY(0px) scale(0.95);
}

/* Анимация появления/исчезновения активного состояния */
@keyframes vote-activation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.action-btn.vote-up.active,
.action-btn.vote-down.active {
    animation: vote-activation 0.3s ease;
}

/* Пульсация для активных кнопок */
@keyframes vote-pulse {
    0% { box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4); }
    50% { box-shadow: 0 6px 16px rgba(40, 167, 69, 0.6); }
    100% { box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4); }
}

@keyframes vote-pulse-down {
    0% { box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 6px 16px rgba(220, 53, 69, 0.6); }
    100% { box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4); }
}

.action-btn.vote-up.active {
    animation: vote-pulse 2s infinite;
}

.action-btn.vote-down.active {
    animation: vote-pulse-down 2s infinite;
}

/* Активные состояния */


.action-btn.vote-up.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #1e7e34;
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    transform: translateY(0px);
}

.action-btn.vote-down.active {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    border-color: #bd2130;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    transform: translateY(0px);
}

button.action-btn.vote-down.compact.active{
    background-color: #f44336;
    transform: translateY(0px);
}
button.action-btn.vote-up.compact.active {
    background-color: #41b125;
    transform: translateY(0px);
}


.action-btn.vote-down.active:hover {
    /* transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5); */
    background: linear-gradient(135deg, #fd7e14, #dc3545);
}

/* Компактные версии */
.action-btn.compact {
    width: 28px;
    height: 28px;
    margin: 0 2px;
    border-radius: 6px;
}

.action-btn.vote-up.compact svg,
.action-btn.vote-down.compact svg {
    width: 14px;
    height: 14px;
}

.action-btn.compact svg {
    width: 14px;
    height: 14px;
}

.action-btn.report-btn {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: 4px;
    padding: 0;
}

.action-btn.report-btn:hover {
    background: #ffeeba;
}

/* Компактные стили для блока рейтинга и жалобы */
.comment-rating.compact {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 12px;
    vertical-align: middle;
}

.comment-rating-value.compact {
    font-size: 15px;
    min-width: 18px;
    padding: 0 2px;
}

.action-btn.compact {
    width: 22px;
    height: 22px;
    font-size: 15px;
    padding: 0;
    margin: 0 1px;
    border-radius: 4px;
}

.action-btn.vote-up.compact {
    color: #3498db;
}

.action-btn.vote-down.compact {
    color: #dc3545;
}

.action-btn.report-btn.compact {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    font-size: 13px;
    margin-left: 2px;
}

.action-btn.compact:hover {
    background: #f2f2f2;
}

.action-btn.report-btn.compact:hover {
    background: #ffeeba;
}

/* Компактный блок рейтинга комментариев */
.comment-rating.compact {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 0;
    vertical-align: middle;
    font-size: 13px;
}

/* Кнопки рейтинга - компактные */
.action-btn.vote-up.compact,
.action-btn.vote-down.compact,
.action-btn.report-btn.compact {
    width: 22px;
    height: 22px;
    font-size: 13px;
    padding: 0;
    border-radius: 50%;
    margin: 0 1px;
    border: 1px solid #e5e7eb;
    background: #f8f9fa;
    transition: background 0.2s, color 0.2s;
}

.action-btn.vote-up.compact {
    color: #3498db;
}

.action-btn.vote-down.compact {
    color: #dc3545;
}

.action-btn.report-btn.compact {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.action-btn.vote-up.compact:hover {
    background: #deffe6;
}

.action-btn.vote-down.compact:hover {
    background: #f8d7da;
}

.action-btn.report-btn.compact:hover {
    background: #ffeeba;
}

.comment-rating-value.compact {
    min-width: 18px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    margin: 0 2px;
}

/* Уровни вложенности */
.comment.reply,
.comment.reply-1 {
    margin-left: 20px;
    border-left: 1px solid #3498db;
    background: #f8fbff;
    padding-left: 12px;
}

.comment.reply-2 {
    margin-left: 40px;
    border-left: 1px solid #28a745;
    background: #f6fff8;
    padding-left: 12px;
}

/* Плоский третий уровень: без доп. отступа */
.comment.reply-3 {
    margin-left: 0;
    border-left: 1px солид #ffc107;
    background: #fffdf5;
    padding-left: 12px;
}

/* Контейнер ответов не добавляет смещения — отступ регулируют сами карточки */
.comments-section .comment>.comment-replies {
    margin-left: 0;
    margin-top: 10px;
}

/* Сворачивание веток комментариев */
.comment-branch-footer {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.toggle-replies-btn {
    background: hwb(0 100% 0%);
    border: none;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    color: #3498db;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.toggle-replies-btn:hover {
    background-color: hwb(0 100% 0%);
}

.toggle-replies-btn i {
    line-height: 1;
}

.comment.collapsed > .comment-replies {
    display: none !important;
}

.comment.collapsed {
    padding-bottom: 8px !important;
}

.comment.collapsed .toggle-replies-btn {
    color: #3b82f6;
}

.collapsed-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #10b981; /* Зеленый при развернутом состоянии */
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    border: 1px solid #059669;
}

.comment.collapsed .collapsed-info {
    background: #f1f5f9; /* #f1f5f9 при свернутом состоянии */
    color: #2980b9;
    border-color: #e2e8f0;
    box-shadow: none;
}

.comment.collapsed .collapsed-info:hover {
    background: #e2e8f0;
    transform: none;
    box-shadow: none;
}

.collapsed-info i {
    color: #fff;
    font-size: 12px;
}

.comment.collapsed .collapsed-info i {
    color: #3498db;
}

.total-collapsed-count {
    font-weight: 700;
}

.branches-collapsed-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
}

.comment.collapsed .branches-collapsed-count {
    color: #28a745;
}



.comment.collapsed .toggle-replies-btn i::before {
    content: "\f0fe"; /* fas fa-plus-square */
}

/* Изменяем иконку при сворачивании */
.comment:not(.collapsed) .toggle-replies-btn i::before {
    content: "\f146"; /* fas fa-minus-square */
}


.replies-toggle>button {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: background 0.2s, color 0.2s;
}

.replies-toggle>button:hover {
    background: #e2e6ea;
    color: #3498db;
}

.replies-toggle>button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.replies-toggle>button.expanded {
    background: #e2e6ea;
    color: #3498db;
    font-weight: 500;
}

/* Подсветка нового */
@keyframes comment-flash {
    0% {
        background: #fffbe6;
    }

    100% {
        background: inherit;
    }
}

.comment.flash-highlight {
    animation: comment-flash 2.5s ease-out;
}

/* Финальные переопределения против старых css */
.comments-section .comment-replies {
    margin-left: 0 !important;
}

.comments-section .comment.reply-3 {
    margin-left: 0 !important;
}

.comments-section .comment.reply-3 .reply-form {
    margin-left: 0 !important;
}

.comment-replies {
    margin-left: 0;
    margin-top: 10px;
}

.comment.reply {
    margin-left: 5px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
}

.comment-header-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex: 1; /* Чтобы занимало доступное место */
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
}

.author-name:hover {
    text-decoration: underline;
}

.comment-date,
.comment-link {
    color: #6c757d;
    font-size: 12px;
}

.comment-content {
    margin-bottom: 10px;
}

.comment-content p {
    margin: 5px 0;
}

.reply-button,
.edit-button,
.delete-button {
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: none;
    transition: background-color 0.2s, color 0.2s;
}

.reply-button {
    background-color: #e9ecef;
    color: #212529;
}

.reply-button:hover {
    background-color: #dee2e6;
		color: #666666;
}

.edit-button {
    background-color: #cfe2ff;
    color: #084298;
}

.edit-button:hover {
    background-color: #b6d4fe;
    color: #052c65;
}

.delete-button {
    background-color: #f8d7da;
    color: #721c24;
}

.delete-button:hover {
    background-color: #f5c6cb;
    color: #58151c;
}

/* Стиль для кнопки удаления */
.button-danger {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.button-danger:hover {
    background-color: #c82333;
    color: #fff;
}

/* Стили для кнопки избранного */
.bookmark-button {
    background-color: #fff3e0;
    color: #ff6600;
    border: 2px solid #ff6600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bookmark-button:hover {
    background-color: #ffe0b2;
    color: #e65100;
    border-color: #e65100;
    transform: translateY(-1px);
}

.bookmark-button.active {
    background-color: #ff6600;
    color: white;
    border-color: #ff6600;
}

.bookmark-button.active:hover {
    background-color: #e65100;
    border-color: #e65100;
}

/* Стили для отметки о редактировании комментария */
.edited-mark {
    font-size: 11px;
    font-style: italic;
    color: #6c757d;
    margin-left: 5px;
}

/* Стили для страницы редактирования комментария */
.comment-edit-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
}

.comment-edit-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Стили для модерации */
.moderation-container {
    margin-top: 20px;
}

.moderation-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.moderation-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.moderation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #6c757d;
    font-size: 14px;
    color: #333;
}

.article-content-body {
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    font-size: 15px;
}

/* Стили для элементов внутри превью */
.article-content-body p {margin-top: 0;margin-bottom: 0; }
.article-content-body ul, .article-content-body ol { margin-bottom: 10px; padding-left: 20px; }
.article-content-body h1, .article-content-body h2, .article-content-body h3 { font-size: 1.1em; margin-top: 15px; margin-bottom: 8px; }

.moderation-excerpt {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}

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

/* Улучшенные стили для категорий в карточках статей */
.article-categories {
    margin-top: 0;
    /*10px*/
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 14px;
}

.categories-label {
    font-weight: 500;
}

.category-tag {
    display: inline-block;
    margin-right: 5px;
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.category-tag:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Стили для счетчика комментариев */
.comments-count {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    gap: 5px;
    transition: color 0.2s;
}

.comments-count:before {
    content: "\f075";
    font-family: "Font Awesome 5 Free";
    font-weight: 400; /* Regular comment icon */
    font-size: 16px;
}

.comments-count:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Стили для информации о фильтре категории */
.category-filter-info {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 20px;
    color: #1565c0;
		width: 100%;
}

.category-filter-info a {
    color: #0d47a1;
    text-decoration: underline;
}

.category-filter-info a:hover {
    color: #1565c0;
}

/* Стили для взаимодействия со статьей */
.article-interaction {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    flex-wrap: wrap;
    align-items: baseline;
}

.article-likes {
    display: flex;
    gap: 10px;
}

/* Улучшенные стили для кнопок лайков */
.like-button,
.dislike-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.like-button {
    background-color: #e3f2fd;
    color: #1976d2;
    border-color: #1976d2;
}

.like-button:hover {
    background-color: #bbdefb;
    transform: translateY(-1px);
}

.like-button.active {
    background-color: #2196f3;
    color: white;
    border-color: #2196f3;
}

.dislike-button {
    background-color: #ffebee;
    color: #d32f2f;
    border-color: #d32f2f;
}

.dislike-button:hover {
    background-color: #ffcdd2;
    transform: translateY(-1px);
}

.dislike-button.active {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
}

.like-button:disabled,
.dislike-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Стили для readonly отображения лайков */
.article-likes-readonly {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.likes-display,
.dislikes-display {
    padding: 4px 8px;
    background-color: #e9ecef;
    border-radius: 10px;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

.login-prompt {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
}

.login-prompt a {
    color: #3498db;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Стили для облака популярных тегов */
.popular-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background-color: #6f42c1;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-cloud-item:hover {
    background-color: #5a2d91;
    color: white;
    transform: scale(1.1);
}

.tag-cloud-count {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 10px;
}

/* Стили для ввода тегов */
.tags-help {
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 0 solid #e9ecef;
}

.popular-tags-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.tag-suggestion {
    background-color: #717fa3;
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
}

.tag-suggestion:hover {
    background-color: #308aeb;
}

/* Стили для автодополнения тегов */
.tag-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.tag-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.tag-suggestion-item:hover {
    background-color: #f8f9fa;
}

.tag-suggestion-item:last-child {
    border-bottom: none;
}

/* Позиционирование для поля ввода тегов */
.form-group {
    position: relative;
}

button#report-article-btn {
    padding: 8px;
}

.article-read-more-button{
padding: 6px 10px;
border-radius: 6px;
border: 1px solid;
font-size: 14px;
}



.article-stats {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
    align-items: center;
    margin-bottom: 5px;
}

.poll-indicator-bottom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 10px;
    border-radius: 16px;
    background-color: rgba(52, 152, 219, 0.1);
    transition: all 0.2s ease;
    margin-left: 10px;
    color: #3498db;
    cursor: default;
}

.poll-indicator-bottom:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

.poll-votes-count {
    /* margin-left: 6px; */
    font-size: 13px;
    font-weight: 600;
}

button.rating-action-btn.btn-like{
	border: 2px solid #d0d0d0;

}
button.rating-action-btn.btn-like:hover{
	border: 2px solid #d0d0d0;
}

button.rating-action-btn.btn-dislike{
	border: 2px solid #d0d0d0;
}

article.full-article>.article-footer{
	border-top: 0px solid #eee;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {

.article-card:hover {
    transform: none;

}
	.article-footer {
    margin-top: 0;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

	.article-comments {
    margin-top: 10px;
    padding-top: 0;
    border-top: 0px solid #eee;
}

    .article-actions .button-secondary {
        margin-right: 5px;
    }
    button#report-article-btn {
        padding: 6px;
        width: auto;
    }
    
    /* Скрываем текст в кнопке "Пожаловаться" на мобильных, оставляем только иконку */
    button#report-article-btn {
        /* padding: 8px; */
        min-width: 40px;
        justify-content: center;  
    }
    
    button#report-article-btn svg {
        margin-right: 0 !important;
    }
    
    /* Скрываем текст "Пожаловаться" */
    button#report-article-btn {
        font-size: 0;
    }
    
    /* Показываем только SVG иконку */
    button#report-article-btn svg {
        font-size: initial;
    }

    .user-articles {
        margin-top: 5px;
    }

    .user-article-meta {
        flex-direction: row;
        gap: 5px;
    }

    .form-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-inline label {
        margin-bottom: 5px;
    }

    .comment.reply {
        margin-left: 5px;
    }

    .categories-selector {
        /* flex-direction: column; */
        align-items: flex-start;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .moderation-actions,
    .article-actions,
    .comment-actions {
        flex-direction: row;
        align-items: center;
    }

    .moderation-actions>*,
    .article-actions>*,
    .comment-actions>* {
        margin-bottom: 5px;
        width: auto;
        box-sizing: border-box;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .error-page h1 {
        font-size: 2em;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-actions .button-primary,
    .error-actions .button-secondary {
        width: 200px;
    }

    article.full-article>footer.article-footer>.article-actions>a.button-secondary,
    a.button-secondary {
        width: auto;
        display: flex;
        flex-wrap: wrap;
    }

    .articles-container>article.article-card.draft-card>.article-actions>a.button-primary,
    a.button-secondary,
    a.button-danger {
        width: auto;
    }

    main.main-content>.container>.action-buttons>a.button-primary,
    a.button-secondary {
        width: auto;
    }

    .comment-rating button {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .comment-rating-value {
        font-size: 12px;
    }

    .comment {
        padding: 5px;
        margin: 4px 0;
    }

    .comment-actions .action-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin-right: 6px;
        /* background: none; */
        border: none;
        border-radius: 4px;
        cursor: pointer;
        width: 16px;
        height: 16px;
        transition: background 0.18s;
    }
		.article-card {
			/* padding: 10px; */
			border-radius: 4px;
			box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1);
		}
	}

/* Стили для PopUp, поиска и скролла */
.show-more-btn {
    background: #e3f2fd;
    color: #1565c0;
    border: none;
    border-radius: 6px !important;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    -webkit-border-radius: 6px !important;
    -moz-border-radius: 6px !important;
    -ms-border-radius: 6px !important;
    -o-border-radius: 6px !important;
}

.show-more-btn:hover {
    background: #bbdefb;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 24px 28px;
    min-width: 340px;
    max-width: 420px;
    max-height: 80vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    position: relative;
    display: flex;
    flex-direction: column;
    top: 65px;
    margin: 0 auto;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

.popup-list {
    margin-top: 18px;
    overflow-y: auto;
    max-height: 48vh;
    border-radius: 4px;
    border: 1px solid #e3f2fd;
    padding: 8px;
    background: #f8f9fa;
}

#tags-popup-search,
#categories-popup-search {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e3f2fd;
    margin-top: 8px;
    font-size: 15px;
    background: #f8f9fa;
}

.popup-list .tag-suggestion {
    display: inline-block;
    margin: 4px 6px 4px 0;
    cursor: pointer;
}

.popup-list .category-checkbox {
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .popup-content {
        min-width: 90vw;
        max-width: 98vw;
        padding: 18px 8px 12px 8px;
    }
}

.tag-suggestion.selected {
    background: #3498db !important;
    color: #fff !important;
    border-radius: 6px;
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/**/

.search-form {
    margin-bottom: 20px;
}

.search-form form {
    /* display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%; */
}

.search-form input[type="text"] {
    padding: 8px;
    width: 100%;
}

.search-form select {
    padding: 8px;
}

.search-form button {
    padding: 9px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
}

.search-form button:hover {
    background-color: #0056b3;
}

/* Add to ../css/articles.css */

/* For highlighting the article */
.article-card.highlight {
    background-color: #f0f8ff;
    /* Светлый фон для подсветки */
    transition: background-color 1s ease;
}

/* Компактная пагинация */
.page-current {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 10px;
    color: #666;
    font-weight: bold;
}

/* SVG иконки в кнопках действий */
.action-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    display: block;
    transition: stroke 0.18s;
}

.action-btn:hover svg {
    stroke: currentColor;
}

.action-btn.reply-btn:hover svg { 
    stroke: white; 
}

.action-btn.edit-btn:hover svg { 
    stroke: white; 
}

.action-btn.delete-btn:hover svg { 
    stroke: white; 
}

.action-btn.copy-btn:hover svg { 
    stroke: white; 
}

/* Специальные размеры для компактных кнопок */
.action-btn.compact svg {
    width: 14px;
    height: 14px;
}

span.stats-item.views-count {
    display: flex;
    align-items: center;
    gap: 4px;
}
span.stats-item.likes-count,span.stats-item.dislikes-count{
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin-left: 0;
}
span.stats-item.likes-count:hover,
span.stats-item.dislikes-count:hover {
    color: #3498db;
}
a.stats-item.off-comments-count {
    display: flex;
    align-items: center;
		color: #6c757d;
		gap: 4px;
}
a.stats-item.off-comments-count:hover {
		color: #3498db;
}
.articles-card-list-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    /* font-size: 16px; */
    color: #6c757d;
}
.articles-card-list-toolbar:hover {
    color: #3498db;
}
i.fas.fa-image{
	color: #6c757d;
}
i.fas.fa-image:hover{
	color: #3498db;
}
.fa-image:before{
	color: #3498db;
}
.fa-image:hover:before{
	color: #2980b9;
}

.likes-count-clickable:hover,
.dislikes-count-clickable:hover {
    background-color: rgba(52, 152, 219, 0);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none!important;
}

.stats-item.article-rating-display:hover{
	color: #3498db;
	cursor: default;
}

.article-card{
	margin: 0;
}

a.button-primary.open-filter-btn {
    padding: 8px 15px;
}

/* Скрытие панели действий на мобильной версии */
@media (max-width: 768px) {
    .action-buttons {
        display: none;
    }
}

/* Стили для превью изображения статьи */
/* Стили для превью изображения статьи */
.article-preview-image {
    width: calc(100% + 30px);
    margin: -15px -15px 12px -15px;
    height: auto;
    max-height: 450px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.article-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-preview-image:hover img {
    transform: scale(1.02);
}

/* Fallback Header Styles for Article Cards */
.article-card-header-fallback {
    width: calc(100% + 30px);
    margin: -15px -15px 12px -15px;
    height: 180px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.fallback-header-link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 5;
    position: relative;
}

.fallback-header-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    width: 100%;
}

.site-header-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: white;
}

.fallback-logo {
    max-height: 55px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.fallback-header-link:hover .fallback-logo {
    transform: scale(1.1);
}

.fallback-icon {
    font-size: 3.5rem;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.9);
}

.fallback-site-title {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    font-family: 'Montserrat', sans-serif;
}

.fallback-article-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    text-shadow: 0 2px 15px rgba(0,0,0,0.6);
    display: block;
    line-height: 1.2;
    max-width: 90%;
    margin: 0 auto;
}

.article-card-header-fallback.has-custom-header {
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.article-card-header-fallback .article-header-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.article-card-header-fallback.has-divider .header-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 2;
    line-height: 0;
}

.article-card-header-fallback.has-divider .header-divider svg {
    height: 30px;
    width: 100%;
}

/* Адаптация для разных режимов отображения */

.articles-container.view-grid-2 .article-card {
    display: flex;
    flex-direction: column;
}

/* Стили для индикатора загрузки */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sidebar Toggle and Layout */
.right-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.switch .slider:before {
    height: 19px;
    width: 19px;
		left: 0;
    top: 0;
}

.sidebar-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

label.switch {
    margin-bottom: 0;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

.articles-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    margin-top: 0px;
}

.articles-main-content {
    flex: 1;
    min-width: 0;
}

.right-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.sidebar-hidden .right-sidebar {
    display: none !important;
}

.sidebar-hidden .articles-main-content {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 1024px) {
    .articles-layout {
        gap: 15px;
    }
    .right-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .articles-layout {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .articles-main-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }
    
    .right-sidebar {
        width: 100%;
        display: none; /* Usually hidden on mobile unless explicitly toggled (existing mobile logic) */
    }
    
    .sidebar-toggle-wrapper {
        display: none; /* Hide toggle on mobile as sidebar is already handled differently */
    }
    
    /* Переключаем grid на одну колонку на мобильных */
    .articles-container.view-grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    .article-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
		.article-form {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    padding: 5px;
    margin-bottom: 10px;
}
.full-article {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    padding: 15px;
    margin-bottom: 20px;
}
}

/* Стили для развертывания статей */
.article-card.is-expanded {
    position: relative;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.15) !important;
    margin-bottom: 25px !important;
    /* transition: all 0.3s ease; */
    border: 4px solid #3fb400;
    background-color: #fbfdff;
}

/* Вертикальная полоска сбоку при развертывании */
.article-card.is-expanded::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #3498db;
    border-radius: 4px;
    animation: stripeIn 0.3s ease-out;
    z-index: 10;
}

@keyframes stripeIn {
    from { opacity: 0; transform: scaleY(0); }
    to { opacity: 1; transform: scaleY(1); }
}

.article-full-content {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    line-height: 1.7;
    color: #2c3e50;
    font-size: 16px;
    animation: fadeIn 0.4s ease;
}

.article-card.is-expanded .article-full-content {
    display: block;
}

.article-card.is-expanded .article-content-body {
    max-height: none;
    overflow: visible;
}

.article-card.is-expanded .article-preview-image {
    display: none; /* Скрываем превью, если статья развернута - Pikabu style */
}

/* Круглые кнопки + и - */
.article-toggle-container {
    display: flex;
    justify-content: center;
    margin-top: -30px; /* Сильнее заезжаем на текст для эффекта наложения */
    padding-bottom: 0;
    position: relative;
    z-index: 100;
    pointer-events: none; /* Чтобы контейнер не мешал кликам по тексту, если он перекрывает */
}

/* Кнопки должны реагировать на клики */
.expand-article-btn, .collapse-article-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; /* Уменьшили размер до "небольшого" */
    height: 30px;
    background: #fff;
    border: 1px solid #3498db;
    border-radius: 50% !important;
    color: #3498db;
    font-size: 14px; /* Чуть меньше шрифт */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.expand-article-btn:hover, .collapse-article-btn:hover {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

.article-card.is-expanded .expand-article-btn {
    display: none !important;
}

.article-card:not(.is-expanded) .collapse-article-btn {
    display: none !important;
}

/* Стили для тела статьи с сохранением HTML структуры */
.article-card:not(.is-expanded) .article-content-body.can-expand {
    position: relative;
    max-height: 400px; /* Приблизительно 400 символов текста */
    overflow: hidden;
    margin-bottom: 10px;
}

.article-card:not(.is-expanded) .article-content-body.can-expand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Уменьшили высоту градиента, чтобы он не залезал на начало текста */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 95%);
    pointer-events: none;
}

/* Кнопка сворачивания под текстом */
.article-card.is-expanded .article-toggle-container {
    position: relative;
    top: auto;
    float: none;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    width: 100%;
}


/* Блок рейтинга внизу статьи */
.article-bottom-rating {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px dashed #e0e0e0;
    text-align: center;
}

/* Скрываем только если есть кнопка развертывания и статья НЕ развернута */
.article-card.has-expand-btn:not(.is-expanded) .article-bottom-rating {
    display: none;
}

/* Показываем при раскрытии (с анимацией) */
.article-card.is-expanded .article-bottom-rating {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Для коротких статей блок показывается по умолчанию (display: block у самого класса) */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-rating-title {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-size: 15px;
    font-weight: 600;
}

.article-rating-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.rating-action-btn {
    width: 38px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rating-action-btn:hover {
    transform: scale(1.1);
    border-color: #bdc3c7;
    color: #ffffff;
}

.rating-action-btn.btn-like.active,
.rating-action-btn.btn-like:active {
    border-color: #27ae60;
    background: #27ae60;
    color: white;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}

.rating-action-btn.btn-dislike.active,
.rating-action-btn.btn-dislike:active {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

/* Эффект вылетающей цифры (+1/-1) */
.rating-fly-indicator {
    position: absolute;
    font-weight: bold;
    font-size: 18px;
    pointer-events: none;
    z-index: 1000;
    animation: ratingFlyUp 0.8s ease-out forwards;
    white-space: nowrap;
}

.rating-fly-indicator.plus {
    color: #27ae60;
}

.rating-fly-indicator.minus {
    color: #e74c3c;
}

@keyframes ratingFlyUp {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(1);
    }
}

.article-rating-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.current-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    background: #fff;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
}

.current-rating-badge:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

i.fas.fa-chart-pie{
	color: #6c757d;
}
/*.poll-indicator-stats*/
.poll-indicator-stats {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 14px;
    cursor: default;
}
.poll-indicator-stats:hover {
    color: #495057;
}

.poll-votes-count {
    font-weight: 500;
}


@media (max-width: 768px) {
    .article-card.is-expanded .article-toggle-container {
        top: auto;
        margin-right: 0;
    }
}

.article-card.is-expanded .article-read-more-button,
.article-card.is-expanded .button-secondary {
    display: none; /* Скрываем оригинальную кнопку "Читать далее" при развертывании */
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Мобильная версия */
@media (max-width: 768px) {
    .article-card.is-expanded::before {
        left: -8px;
        width: 4px;
    }

    .article-toggle-container {
        display: flex !important;
    }

    /* Стили для сокращенного контента на мобильных */

    .expand-article-btn {
        animation: mobilePulse 2s infinite;
    }

    .article-card.is-expanded .article-toggle-container {
        position: sticky;
        top: 80px;
        float: right;
        margin-top: 0;
        margin-right: 0;
        z-index: 100;
    }

    .expand-article-btn, .collapse-article-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
    }
		.article-content-body {
				margin-bottom: 8px;
			}
		.article-content-body p{
				margin-top: 0;
				margin-bottom: 0;
		}
		.rating-action-btn {
				width: 32px;
				height: 32px;
				border-radius: 50%;
				border: 0 solid #e0e0e0;
				background: #fff;
				color: #aaa;
				font-size: 16px;
		}
		.article-actions a {
        min-width: 40px;
        height: inherit;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
		.article-title {
    font-size: 21px;
		display: flex;
		align-items: center;
		/* flex-wrap: wrap; */
}
.article-title a {
    font-size: 1.5rem;
}
}



/* Стили для прочитанных статей */
.article-card.is-read {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.article-card.is-read:hover {
    opacity: 0.95;
}

.article-card.is-read .article-title a {
    color: #888 !important;
}

.read-status-icon {
    display: none; /* Скрыто по умолчанию */
    margin-left: auto;
    font-size: 1.1em;
    color: #2ecc71;
    vertical-align: middle;
    opacity: 0.9;
    cursor: pointer;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.read-status-icon::before {
    content: '\f058'; /* fas fa-check-circle */
}

/* Показываем только если есть класс is-read на карточке */
.article-card.is-read .read-status-icon {
    display: inline-block;
}

/* Дополнительная мера: форсированное скрытие если класса нет */
.article-card:not(.is-read) .read-status-icon {
    display: none;
}


.article-card.is-read .article-preview-image img {
    filter: grayscale(0.6);
    transition: filter 0.3s ease;
}

.article-card.is-read:hover .article-preview-image img {
    filter: grayscale(0.2);
}

/* Новые стили для кнопок в черновиках */
.article-draft-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0px solid #edf2f7;
}

.article-draft-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.article-draft-actions a i {
    font-size: 16px;
}

/* Редактировать - Slate/Indigo */
.btn-edit-draft {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.btn-edit-draft:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Опубликовать - Emerald */
.btn-publish-draft {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #d1fae5;
}

.btn-publish-draft:hover {
    background-color: #059669;
    color: #ffffff;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2);
}

/* Удалить - Rose */
.btn-delete-draft {
    background-color: #fff1f2;
    color: #e11d48;
    border-color: #ffe4e6;
}

.btn-delete-draft:hover {
    background-color: #e11d48;
    color: #ffffff;
    border-color: #e11d48;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.2);
}

.article-draft-actions a:active {
    transform: translateY(0);
    filter: brightness(0.9);
}

@media (max-width: 768px) {
	div#articles-list>.articles-container.view-list {
    gap: 20px !important;
}
	.article-meta {
		flex-direction: row;
}
    .article-draft-actions {
        gap: 12px;
    }
    
    .article-draft-actions a {
        width: 44px;
        height: 44px;
    }
    .comment-header {
        align-items: center !important;
    }
    .comment.reply, .comment.reply-1 {
    margin-left: 0;
    border-left: 1px solid #3498db;
    background: #f8fbff;
    padding-left: 8px;
}
.comment-actions {
    display: flex;
    align-items: center;
}
.articles-container:not(.view-grid-2) .article-card, .articles-grid .article-card {
    padding: 8px;
}


/* Стили для развернутой статьи */
.article-card.is-expanded {
    border: 2px solid #28a745 !important;
    position: relative;
    transition: border-color 0.3s ease, padding-left 0.3s ease;
}

/* --- НОВЫЙ ИНДИКАТОР: ПОЛУКРУГ ПО ЦЕНТРУ (V2-B) --- */

.reading-collapse-semi-circle {
    position: fixed;
    bottom: 55px; /* Высота мобильного меню */
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 50px;
    height: 30px; /* Ровно половина ширины для идеального полукруга */
    background: rgba(40, 167, 69, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50px 50px 0 0; /* Верхние углы скруглены */
    display: flex;
    align-items: flex-end; /* Иконка ближе к верху полукруга */
    justify-content: center;
    color: white;
    z-index: 1001; /* Поверх всего */
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, background 0.2s;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    padding-bottom: 0;
}

.reading-collapse-semi-circle.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.reading-collapse-semi-circle:hover {
    background: rgba(40, 167, 69, 1);
    height: 32px; /* Небольшой эффект при наведении */
}

.reading-collapse-semi-circle i {
    font-size: 16px;
    margin-bottom: 7px; /* Центрируем иконку в полукруге */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.reading-collapse-semi-circle .progress-text {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.reading-collapse-semi-circle:hover .progress-text {
    opacity: 1;
}

/* Скрываем на десктопе, если мешает */
@media screen and (min-width: 1025px) {
    .reading-collapse-semi-circle {
        bottom: 20px; /* Нет мобильного меню на десктопе обычно */
    }
}


/* Rating Fly Indicator Animation */
.rating-fly-indicator {
    position: absolute;
    z-index: 9999;
    font-weight: 800;
    pointer-events: none;
    animation: ratingFlyUp 1s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 14px;
}

.rating-fly-indicator.plus {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.rating-fly-indicator.minus {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

@keyframes ratingFlyUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1.2);
    }
    100% {
        transform: translateY(-50px) scale(1);
        opacity: 0;
    }
}

/* Rating Button Loading State */
.rating-action-btn.is-loading {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
    position: relative;
}

.rating-action-btn.is-loading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: #3498db;
    animation: ratingPulse 1s infinite ease-in-out;
    border-radius: 2px;
}

@keyframes ratingPulse {
    0%, 100% { transform: scaleX(0.5); opacity: 0.3; }
    50% { transform: scaleX(1); opacity: 1; }
}
}

/* --- File: article-tags.css --- */
.article-tags {

    margin: 10px 0;

    position: relative;

}



.tags-label {

    font-weight: 500;

    margin-right: 5px;

    display: inline-block;
    border-radius: 4px;

}



.tags-container {

    display: inline;

}



.tag {

    display: inline-block;

    background-color: #6f42c1;

    color: white;

    padding: 3px 8px;

    border-radius: 4px;

    margin-right: 5px;

    margin-bottom: 5px;

    font-size: 12px;

    text-decoration: none;

    transition: background-color 0.2s;

}



.tag:hover {

    background-color: #5a2d91;

    color: white;

}



.show-more-tags {

    display: inline-block;

    background: none;

    border: none;

    color: #6f42c1;

    cursor: pointer;

    font-size: 12px;

    padding: 0;

    margin-left: 5px;

    text-decoration: underline;

}



.show-more-tags:hover {

    color: #5a2d91;

}


span#selected-tags-counter,
.selected-counter {
    display: flex;
    align-items: center;
}




/* Стили для раздела редактирования изображений в форме статьи */
.form-group.images-group {
    margin-bottom: 30px;
}

.images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    min-height: 150px;
}

.image-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    padding: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: move; /* Для указания на возможность перетаскивания */
}

.image-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.image-item img {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.image-item .delete-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.2s;
}

.image-item .delete-image:hover {
    background: #c82333;
}

.image-item:active {
    opacity: 0.7; /* Эффект при перетаскивании */
    box-shadow: 0 0 0 2px #3498db; /* Подсветка во время drag */
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
    .images-list {
        flex-direction: column;
        align-items: center;
    }
    
    .image-item {
        width: auto;
        max-width: 300px;
    }
    
    .image-item img {
        max-width: 100%;
    }
}

/* Интеграция с галереей просмотра (адаптация из article-gallery.css для редактирования) */
.images-list.force-scroll {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f3f4f6;
}

.images-list.force-scroll::-webkit-scrollbar {
    height: 8px;
}

.images-list.force-scroll::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.images-list.force-scroll::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

/* --- File: collapsible-blocks.css --- */
.collapsible-block {
    /* border: 1px solid #e2e8f0; */ /* Убрано по запросу */
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa; /* Изменено по запросу */
		border-radius: 0 0 6px 6px; /* Изменено по запросу */
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    font-weight: 600;
    color: #334155;
    user-select: none;
		border-radius: 6px 6px 0 0;
}

.collapsible-block.collapsed .collapsible-header {
    border-bottom: none;
}

.collapsible-header:hover {
    background-color: #f1f5f9;
}

.collapsible-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #334155;
}

.toggle-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    display: inline-block;
}

.collapsed .toggle-icon {
    transform: rotate(-90deg);
}


.collapsible-content {
    padding: 0.5rem; /*Изменено по запросу*/
    /* border-top: 1px solid #e2e8f0; */ /* Убрано по запросу */
}

.collapsible-block.collapsed .collapsible-content {
    border-top: none; /* Убираем границу сверху, если блок свернут */
}

/* Стили для form-group внутри collapsible-content, чтобы убрать лишние отступы */
.collapsible-content .form-group:first-child {
    margin-top: 0;
}

.collapsible-content .form-group:last-child {
    margin-bottom: 0;
}

/* НЕ МЕНЯТЬ */
.form-group {
    gap: 0;
}
.article-form .form-group {
    border-radius: 6px;
}
.article-form {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}
@media (max-width: 768px) {
		.article-form {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    padding: 0;
    margin-bottom: 0;
		}}

/* --- File: assets.css --- */
/* ContentFilter: общий CSS для блока выбора формата и модалки */
.format-row { display:inline-flex; align-items:center; gap:10px; flex-wrap:wrap; }
.select-wrapper { position:relative; display:inline-flex; align-items:center; }
.select-wrapper select.select-control { -webkit-appearance:none; -moz-appearance:none; appearance:none; background:#fff; border:1px solid #CBD5E1; border-radius:4px; padding:10px 36px 10px 12px; font-size:14px; color:#111827; min-width:260px; box-shadow:0 1px 2px rgba(0,0,0,.03); transition:border-color .15s, box-shadow .15s, color .15s; }
.select-wrapper select.select-control:hover { border-color:#94A3B8; }
.select-wrapper select.select-control:focus { outline:none; border-color:#6366F1; box-shadow:0 0 0 3px rgba(99,102,241,.15); }
.select-wrapper::after { content:''; position:absolute; right:12px; top:50%; transform:translateY(-50%); width:0; height:0; border-left:6px solid transparent; border-right:6px solid transparent; border-top:7px solid #6B7280; pointer-events:none; }
.format-help-icon { background:none; border:none; padding:0; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; color:#4b5563; }
.format-help-icon i { font-size:22px; line-height:1; }
.format-help-icon:hover { color:#374151; }

/* Модалка */
.format-help-modal { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:3000; display:none; }
.format-help-modal .modal-content { max-width:740px; width: auto; margin:8vh auto; background:#fff; border-radius:12px; box-shadow:0 12px 30px rgba(0,0,0,.2); padding:16px 20px; max-height:80vh; overflow:auto; }
.format-help-modal .modal-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.format-help-modal .modal-header h3 { margin:0; font-size:18px; color:#111827; }
.format-help-modal .format-help-close { background:none; border:none; font-size:22px; cursor:pointer; line-height:1;background-color: #6B7280; }
.format-help-modal .modal-body { margin-top:10px; font-size:13px; color:#444; line-height:1.6; }

/* Переключатель предпросмотра и бокс превью */
.preview-toggle { margin-top:8px; display:flex; align-items:center; gap:8px; }
.switch{position:relative;display:inline-block;width:46px;height:24px}
.switch input{opacity:0;width:0;height:0}
.switch .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#cbd5e1;transition:.2s;border-radius:24px}
.switch .slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;top:3px;background:#fff;transition:.2s;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.switch input:checked + .slider{background:#4f46e5}
.switch input:checked + .slider:before{transform:translateX(22px)}
.switch-label{font-size:13px;color:#475569}
.article-preview{display:none;margin-top:10px;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;background:#fafafa}

/* --- File: replies.css --- */
/* Стили для модуля Пост-Ответ */

/* UI Fixes for article cards on this page */
.article-more-dropdown { z-index: 10002 !important; }
.bookmark-popup { z-index: 10003 !important; }

/* Global Replies Feed Header */
.replies-all-header { 
    padding: 0; 
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); 
    border-bottom: 1px solid #e2e8f0; 
    margin-bottom: 30px; 
    border-radius: 12px; 
    text-align: center; 
} 
.replies-all-header h1 { 
    font-size: 2.2rem; 
    color: #1e293b; 
    margin-bottom: 10px; 
    font-weight: 800; 
} 
.replies-all-header p { 
    color: #64748b; 
    font-size: 1.1rem; 
}

/* Tabs for switching views */
.reply-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}
.reply-tab-item {
    text-decoration: none;
    color: #64748b;
    font-weight: 700;
    padding: 8px 18px;
    background: #f1f5f9;
    border-radius: 12px;
    transition: all 0.2s;
    font-size: 14px;
}
.reply-tab-item:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.reply-tab-item.active {
    background: #60c100;
    color: #fff;
    box-shadow: 0 4px 12px rgba(96, 193, 0, 0.3);
}

/* Page specific utilities */
.replies-breadcrumb-center {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}
.replies-breadcrumb-center i {
    font-size: 0.7rem;
    margin: 0 10px;
    opacity: 0.5;
}

.replies-pagination-bottom {
    margin-top: 40px;
    text-align: center;
}

.replies-count-label {
    margin-bottom: 20px;
    color: #64748b;
}

/* Sidebar Specific Styles */
.sb-reply-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sb-reply-item {
    padding-bottom: 12px;
    border-bottom: 1px dashed #f1f5f9;
}
.sb-reply-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sb-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.sb-reply-avatar {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    object-fit: cover;
}
.sb-reply-author {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}
.sb-reply-badge {
    font-size: 0.65rem;
    background: #f1f5f9;
    color: #64748b;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
}
.sb-reply-link {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 2px;
    transition: color 0.2s;
}
.sb-reply-link:hover {
    color: #3498db;
}
.sb-reply-context {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

/* Блок-бейдж под статьей */
.reply-badge-container {
    margin: 20px 0;
    padding: 15px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.reply-badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reply-badge-count {
    font-size: 16px;
    font-weight: 700;
    color: #60c100;
    text-decoration: none;
}

.reply-badge-count:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.reply-badge-author {
    font-size: 13px;
    color: #6c757d;
}

.reply-badge-author strong {
    color: #2c3e50;
    font-weight: 600;
}

.reply-badge-author strong a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.reply-badge-author strong a:hover {
    color: #3498db;
    text-decoration: underline;
}

.reply-badge-btn {
    background: #60c100;
    color: white !important;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.reply-badge-btn:hover {
    background: #5bb403;
}

/* Компактная карточка в списке статей */
.article-reply-mini-card {
    margin: 10px 0;
    padding: 10px 15px;
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    border-radius: 4px;
    font-size: 13px;
    color: #495057;
    border: 1px solid #e9ecef;
    border-left-width: 4px;
    font-family: 'Roboto', sans-serif;
}

.article-reply-mini-card .parent-title {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-top: 4px;
    line-height: 1.4;
    font-size: 14px;
}

.article-reply-mini-card .parent-title:hover {
    color: #3498db;
    text-decoration: underline;
}

.reply-meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.reply-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    font-weight: 700;
}

.parent-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #6c757d;
}

.meta-author-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.meta-author-link:hover {
    color: #3498db;
}

.meta-avatar-mini {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

/* Страница списка ответов */
.container-replies {
    padding-top: 10px;
}

.replies-page-header {
    margin-bottom: 20px;
    padding: 20px 25px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-left: 4px solid #7cb342;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.replies-page-header .breadcrumb {
    margin-bottom: 8px;
    color: #94a3b8;
    font-weight: 500;
    font-size: 13px;
}

.replies-page-header .breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.replies-page-header .breadcrumb a:hover {
    color: #5c6bc0;
}

.replies-page-header .breadcrumb .current {
    color: #cbd5e1;
    margin-left: 5px;
}

.replies-page-header .text-muted {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    color: #78909c;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: 0.1em;
    font-family: 'Montserrat', sans-serif;
}

.replies-page-header h1 {
    margin: 0;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    font-family: 'Montserrat', sans-serif;
}

.replies-page-header h1 a {
    color: #64b5f6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.replies-page-header h1 a:hover {
    color: #3f51b5;
}

.replies-page-header .header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.replies-page-header .original-article-link {
    color: #78909c;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    padding: 6px 0;
}

.replies-page-header .original-article-link:hover {
    color: #546e7a;
    transform: translateX(-3px);
}

.reply-button-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px !important;
    background: #60c100 !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    box-shadow: 0 3px 10px rgba(124, 179, 66, 0.25) !important;
    transition: all 0.2s ease !important;
    border: none !important;
    cursor: pointer;
}

.reply-button-primary:hover {
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.35) !important;
    background: #5bb403 !important;
    transform: translateY(-1px);
}

.reply-button-primary i {
    font-size: 14px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .replies-page-header {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .replies-page-header h1 {
        font-size: 16px;
    }
    
    .replies-page-header .header-actions {
        gap: 8px;
    }
    
    .reply-button-primary,
    .reply-button-secondary {
        font-size: 12px !important;
        padding: 8px 10px !important;
        flex: 1;
        justify-content: center;
    }
    
    .replies-page-header .original-article-link {
        width: 100%;
        order: 3;
        justify-content: center;
        border-top: 1px solid #f1f5f9;
        margin-top: 5px;
        padding-top: 10px;
    }
}

.reply-short-text {
    display: none;
}

@media (max-width: 480px) {
	.replies-page-header .text-muted {
		font-size: 8px;
	}
    .reply-full-text {
        display: none;
    }
    .reply-short-text {
        display: inline;
    }
}

@media (max-width: 320px) {
    .reply-full-text, .reply-short-text {
        display: none !important;
    }
    .reply-button-primary {
        width: 32px;
        height: 32px;
        padding: 0 !important;
        flex: none !important;
        justify-content: center;
        border-radius: 10px !important;
    }
    .reply-button-primary i {
        margin: 0;
        font-size: 16px;
    }
}

/* Article Card Replies Indicator Styles */
.article-replies-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff8f1;
    border: 1px solid #ffedd5;
    border-radius: 8px;
    color: #f59e0b;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
}

.article-replies-indicator:hover {
    background: #ffedd5;
    color: #d97706;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
		border: 1px solid #e7b820;
}

.article-replies-indicator i {
    font-size: 14px;
}

.article-replies-indicator .replies-count {
    background: #f59e0b;
    color: white;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 11px;
    line-height: normal;
}

@media (max-width: 768px) {
    .article-replies-indicator {
        font-size: 13px;
        padding: 4px 10px;
    }
    .article-replies-indicator span {
        display: inline-block; /* Ensure count is visible */
    }
}




/* Кнопки в карточках */
.reply-btn, .view-replies-btn {
    color: #6c757d;
    transition: all 0.2s;
    /* font-size: 18px; */
    cursor: pointer;
}

.reply-btn:hover {
    color: #3498db !important;
    background: rgba(52, 152, 219, 0.1) !important;
}

.view-replies-btn:hover {
    color: #2ecc71 !important;
    background: rgba(46, 204, 113, 0.1) !important;
}
.reply-button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    color: #475569 !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.reply-button-secondary:hover {
    background: #e2e8f0;
    color: #1e293b !important;
}

/* Pagination */
.pagination-container a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    margin: 0 5px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-container a:hover {
    border-color: #60c100;
    color: #60c100;
    background: #f0fdf4;
}

.pagination-container a.active {
    background: #60c100;
    border-color: #60c100;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(96, 193, 0, 0.3);
}

/* Utility classes for visibility */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}


/* --- File: articles-list.css --- */
	.article-card.hidden-article {
		display: none !important;
	}

	#show-previous-container {
		text-align: center;
		padding: 10px 0;
		margin-bottom: 20px;
		border-bottom: 1px dashed #ddd;
	}

	#show-previous-btn,
	#load-more-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 8px 20px;
		font-size: 14px;
		background-color: #f8f9fa;
		border: 1px solid #dee2e6;
		color: #495057;
		border-radius: 20px;
		cursor: pointer;
		transition: all 0.2s;
		margin: 10px auto;
		min-width: 180px;
	}

	#show-previous-btn:hover,
	#load-more-btn:hover {
		background-color: #e9ecef;
		border-color: #adb5bd;
		color: #212529;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	}

	#show-previous-btn i,
	#load-more-btn i {
		font-size: 12px;
	}

	/* Live Search Bar Styles */
	.live-search-wrapper {
		box-sizing: border-box;
		background: #ffffff;
		border-radius: 10px;
		padding: 6px 15px;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
		border: 1px solid #e2e8f0;
		display: flex;
		align-items: center;
		gap: 12px;
		width: 300px;
		margin: 0;
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.live-search-wrapper.is-sticky {
		position: fixed;
		z-index: 900;
		box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
		border-radius: 0 0 10px 10px;
		/* top, left, width set via JS */
	}

	.live-search-input {
		flex: 1;
		border: none;
		outline: none;
		font-size: 15px;
		font-weight: 500;
		color: #1e293b;
		background: transparent;
	}

	.live-search-input::placeholder {
		color: #94a3b8;
	}

	.live-search-icon {
		color: #3498db;
		font-size: 16px;
	}


	.live-search-clear {
		color: #94a3b8;
		cursor: pointer;
		padding: 5px;
		border-radius: 50%;
		display: none;
		background: transparent;
		border: none;
		font-size: 16px;
		line-height: 1;
	}

	.live-search-clear:hover {
		background: #f1f5f9;
		color: #ef4444;
	}

	.live-search-filter-btn {
		background: #f1f5f9;
		border: none;
		color: #475569;
		padding: 6px 14px;
		border-radius: 20px;
		font-size: 13px;
		font-weight: 600;
		cursor: pointer;
		display: flex;
		align-items: center;
		gap: 6px;
	}

	.live-search-filter-btn:hover {
		background: #e2e8f0;
		color: #1e293b;
	}

	@media (max-width: 768px) {
		.live-search-wrapper {
			margin: 0 10px;
		}

		.live-search-filter-btn span {
			display: none;
		}
	}

	/* Articles Filter Search Styles (Renamed from Live Search) */
	.articles-filter-search-wrapper {
		box-sizing: border-box;
		background: #ffffff;
		border-radius: 10px;
		padding: 6px 15px;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
		border: 1px solid #e2e8f0;
		display: flex;
		align-items: center;
		gap: 12px;
		width: 300px;
		margin: 0;
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		height: 40px;
	}

	.articles-filter-search-wrapper.is-sticky {
		position: fixed;
		z-index: 900;
		box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
		border-radius: 0 0 10px 10px;
		/* top, left, width set via JS */
	}

	.articles-filter-search-input {
		flex: 1;
		border: none;
		outline: none;
		font-size: 15px;
		font-weight: 500;
		color: #1e293b;
		background: transparent;
	}

	.articles-filter-search-input::placeholder {
		color: #94a3b8;
	}

	.articles-filter-search-icon {
		color: #3498db;
		font-size: 16px;
	}

	.articles-filter-search-clear {
		color: #94a3b8;
		cursor: pointer;
		padding: 5px;
		border-radius: 50%;
		display: none;
		background: transparent;
		border: none;
		font-size: 16px;
		line-height: 1;
	}

	.articles-filter-search-clear:hover {
		background: #f1f5f9;
		color: #ef4444;
	}

	.articles-filter-btn {
		background: #f1f5f9;
		border: none;
		color: #475569;
		padding: 6px 14px;
		border-radius: 20px;
		font-size: 13px;
		font-weight: 600;
		cursor: pointer;
		display: flex;
		align-items: center;
		gap: 6px;
	}

	.articles-filter-btn:hover {
		background: #e2e8f0;
		color: #1e293b;
	}

	@media (max-width: 768px) {
		.articles-filter-search-wrapper {
			margin: 0 10px;
		}

		.articles-filter-btn span {
			display: none;
		}
	}

	input#live-search-input {
		border: 0px;
	}

	/* Креативная кнопка "Написать статью" в виде пера */
	.create-article-pen {
		position: relative;
		cursor: pointer;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		margin-right: 12px;
		transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	}



	.pen-container {
		position: relative;
		display: flex;
		align-items: center;
		gap: 8px;
		background: linear-gradient(135deg, #10b981 0%, #059669 100%);
		padding: 8px 16px;
		border-radius: 8px;
		box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
		overflow: hidden;
		transition: all 0.3s ease;
	}

	.create-article-pen:hover .pen-container {
		box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
		background: linear-gradient(135deg, #059669 0%, #047857 100%);
	}

	/* Иконка пера */
	.pen-icon {
		width: 18px;
		height: 18px;
		color: #ffffff;
		filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
		transition: transform 0.3s ease;
		z-index: 2;
	}

	.create-article-pen:hover .pen-icon {
		transform: rotate(-12deg) translateY(-1px);
		animation: write 0.6s ease-in-out;
	}

	@keyframes write {

		0%,
		100% {
			transform: rotate(-12deg) translateY(-1px);
		}

		50% {
			transform: rotate(-18deg) translateY(-2px) translateX(1px);
		}
	}

	/* Текст */
	.pen-text {
		color: #ffffff;
		font-weight: 600;
		font-size: 14px;
		letter-spacing: 0.3px;
		text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
		z-index: 2;
		white-space: nowrap;
	}

	/* Эффект чернильных брызг */
	.ink-splash {
		position: absolute;
		width: 6px;
		height: 6px;
		background: rgba(255, 255, 255, 0.4);
		border-radius: 50%;
		opacity: 0;
		pointer-events: none;
	}

	.ink-splash:nth-child(1) {
		top: 20%;
		left: 15%;
	}

	.ink-splash:nth-child(2) {
		top: 60%;
		left: 25%;
	}

	.ink-splash:nth-child(3) {
		top: 40%;
		left: 70%;
	}

	.create-article-pen:hover .ink-splash {
		animation: splash 0.8s ease-out;
	}

	@keyframes splash {
		0% {
			opacity: 0;
			transform: scale(0) translate(0, 0);
		}

		50% {
			opacity: 1;
		}

		100% {
			opacity: 0;
			transform: scale(2.5) translate(var(--splash-x, 15px), var(--splash-y, -15px));
		}
	}

	.ink-splash:nth-child(1) {
		--splash-x: -12px;
		--splash-y: -18px;
		animation-delay: 0s;
	}

	.ink-splash:nth-child(2) {
		--splash-x: 8px;
		--splash-y: 15px;
		animation-delay: 0.1s;
	}

	.ink-splash:nth-child(3) {
		--splash-x: 18px;
		--splash-y: -12px;
		animation-delay: 0.2s;
	}

	/* Плавающая анимация в покое */
	@keyframes float {

		0%,
		100% {
			transform: translateY(0px);
		}

		50% {
			transform: translateY(-3px);
		}
	}

	/* .create-article-pen {
		animation: float 3s ease-in-out infinite;
	} */

	.create-article-pen:hover {
		animation: none;
	}

	/* Адаптив для мобильных */
	@media (max-width: 768px) {
		.pen-text {
			display: none;
		}

		.pen-container {
			padding: 10px;
			border-radius: 8px;
			width: 38px;
			height: 38px;
		}

		.pen-icon {
			width: 18px;
			height: 18px;
		}

		.create-article-pen {
			margin-right: 8px;
		}
	}

	/* Подсветка найденных слов при поиске */
	.search-highlight {
		background: #fde047;
		background: linear-gradient(to bottom, #fef08a 0%, #fde047 100%);
		color: #854d0e;
		padding: 1px 4px;
		margin: 0 -1px;
		border-radius: 3px;
		font-weight: 600;
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
		transition: all 0.2s ease;
		display: inline;
		line-height: 1;
		position: relative;
		z-index: 1;
		-webkit-box-decoration-break: clone;
		box-decoration-break: clone;
	}

	.search-highlight:hover {
		background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
		box-shadow: 0 2px 5px rgba(234, 179, 8, 0.4);
	}

/* Visibility classes */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .articles-filter-search-wrapper.desktop-only {
        display: none !important;
    }

    .articles-filter-search-wrapper.mobile-only {
        display: flex !important;
    }
}

/* Mobile Search Expanding Logic */
@media (max-width: 768px) {


    /* Prevent layout jumps and reflows */
    .site-header {
        overflow-x: hidden; /* Clip internal overflows to prevent page scrollbars */
    }

    .site-header .header-content {
        flex-wrap: nowrap !important;
        height: 60px;
        max-height: 60px;
        width: 100%;
        max-width: 100vw;
    }

    .articles-filter-search-wrapper.mobile-only {
        width: auto;
        min-width: 0;
        height: 44px;
        padding: 0 5px;
        gap: 0;
        transition: flex-grow 0.3s cubic-bezier(0.4, 0, 0.2, 1), gap 0.3s ease;
        z-index: 20;
        position: relative;
        display: flex;
        align-items: center;
    }

    .articles-filter-search-wrapper.mobile-only .articles-filter-search-icon {
        flex-shrink: 0;
        pointer-events: auto;
        cursor: pointer;
        z-index: 21;
        position: relative;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .articles-filter-search-wrapper.mobile-only .articles-filter-btn {
        flex-shrink: 0;
    }

    .articles-filter-search-wrapper.mobile-only .articles-filter-search-input {
        width: 0;
        padding: 0;
        opacity: 0;
        font-size: 0;
        min-width: 0;
        border: none;
        flex-grow: 0;
        margin: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }

    .articles-filter-search-wrapper.mobile-only.is-expanded {
        flex-grow: 1;
        flex-basis: 0; /* Ensures it doesn't push others before it has space */
        gap: 12px;
    }

    .articles-filter-search-wrapper.mobile-only.is-expanded .articles-filter-search-input {
        flex-grow: 1;
        width: auto;
        opacity: 1;
        font-size: 15px;
        pointer-events: auto;
				height: inherit;
				max-height: 30px;
    }

    /* Force hide clear button when collapsed */
    .articles-filter-search-wrapper.mobile-only:not(.is-expanded) .articles-filter-search-clear {
        display: none !important;
    }

    /* Hide User Actions when Search is Active (Simultaneous Uniform Animation) */
    .site-header .user-actions {
        transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                    margin 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        max-width: 400px; /* Safe upper bound */
        opacity: 1;
        overflow: hidden;
        white-space: nowrap;
        flex-shrink: 1 !important;
        flex-basis: auto !important;
        min-width: 0 !important;
        will-change: max-width, opacity;
    }

    .site-header.mobile-search-active .user-actions {
        max-width: 0 !important;
        opacity: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        pointer-events: none;
    }
}

