/* Стили для стены профиля (Feeds) */

/* Обеспечиваем одинаковую структуру для всех пользователей */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.feed-meta {
    flex: 1;
    min-width: 0;
}

.feed-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.feed-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
}

/* Обеспечиваем одинаковую структуру для всех пользователей */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.feed-meta {
    flex: 1;
    min-width: 0;
}

.feed-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.feed-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
}

/* Кнопка "Поделиться" */
.share-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.share-btn:hover {
    background-color: #5a6268;
}

.share-btn i {
    margin-right: 4px;
}

/* Уведомление (toast) сбоку */
.feed-toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    bottom: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10050;
    pointer-events: none;
}
.share-notification {
    pointer-events: auto;
    background-color: #28a745;
    color: #fff;
    padding: 12px 16px 12px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    min-width: 240px;
    max-width: 360px;
    font-size: 14px;
    line-height: 1.4;
    animation: feedToastIn .28s ease-out;
    transition: opacity .28s ease, transform .28s ease;
}
.share-notification--success { background-color: #28a745; }
.share-notification--error { background-color: #dc3545; }
.share-notification.is-hiding { opacity: 0; transform: translateX(16px); }

@keyframes feedToastIn {
    0% { opacity: 0; transform: translateX(24px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* legacy keyframes kept unused-safe */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Стиль для модального окна в single_feed.php */
.modal {
    display: none;
    position: fixed;
    z-index: 1000001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
    padding-top: 60px; /* Space for site header if needed */
}

.modal-content-feeds {
    background-color: #fefefe;
    margin: 0 auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
		padding: 20px 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal .close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.modal .close:hover {
    color: #333;
}

.modal-body {
    padding: 10px 0;
}

.share-url-container {
    display: flex;
    margin-top: 15px;
    gap: 10px;
}

.share-url-container input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-copy {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-copy:hover {
    background-color: #0056b3;
}

.feeds-container {
    margin: 0 auto;
    padding: 0;
}

.feeds-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #6c757d;
    display: flex;
    justify-content: center;
}

/* Форма добавления публикации */
.feed-form-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
}

.feed-form .form-group {
    margin-bottom: 0;
}

.feed-form label {
    display: flex;
    margin-bottom: 0;
    font-weight: 500;
    color: #495057;
}

.feed-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.feed-textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Панель инструментов редактора - для старой версии */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background: #f1f3f4;
    border: 1px solid #ced4da;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.toolbar-btn {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.form-actions {
    text-align: right;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #747bf5;
    border-color: #1877f2;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
		border-radius: 6px;
}

.btn-primary:hover {
    color: #fff;
    background-color: #6366f1;
    border-color: #166fe5;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    color: #fff;
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-sm {
	  padding: 0;
    font-size: 0.875rem;
    border-radius: 0;
    border: 0;
}
.btn-sm:hover {
		background-color: hwb(0 100% 0%)!important;
		color: #007bff!important;
}


/* Список публикаций */
.feeds-list {
    margin-top: 20px;
}

.feed-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    /* Пропускаем отрисовку карточек вне вьюпорта: на вкладке профиля
       одновременно строится до 10 публикаций с разметкой и иконками. */
    content-visibility: auto;
    contain-intrinsic-size: auto 320px;
}

/* Одиночная публикация (просмотр по слагу) */
.single-feed-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
		flex-wrap: wrap;
}

.feed-meta {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.feed-pinned-indicator {
    color: #007bff;
    font-size: 0.8rem;
}

.feed-actions {
    position: relative;
    display: flex;
    gap: 8px;
}

.feed-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    min-width: 120px;
		width: max-content;
}

.feed-menu.active {
    display: block;
}

.feed-menu-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: #333;
    font-size: 0.9rem;
    border-radius: 0;
}

.feed-menu-item:hover {
    background: #f8f9fa;
}

.feed-menu-item i {
    margin-right: 8px;
    width: 16px;
}

.feed-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #212529;
    position: relative;
}

.feed-content.collapsed {
    max-height: 200px;
    overflow: hidden;
}

.feed-content.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
}

.feed-expand-btn {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.feed-expand-btn:hover {
    text-decoration: underline;
}

.feed-content p {
    margin: 0;
}

.feed-content p:last-child {
    margin-bottom: 0;
}

.feed-content ul, .feed-content ol {
    margin: 0 0 10px 20px;
    padding-left: 20px;
}

.feed-content strong, .feed-content b {
    font-weight: 600;
}

.feed-content em, .feed-content i {
    font-style: italic;
}

.feed-content u {
    text-decoration: underline;
}

.feed-content s, .feed-content strike {
    text-decoration: line-through;
}

/* Code/blocks inside feed content (prevent overflow) */
.feed-content pre {
    margin: 6px 0;
    padding: 8px 10px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
    white-space: pre;
}
.feed-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.feed-content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    white-space: inherit;
    overflow-wrap: normal;
    word-break: normal;
}
.feed-content img, .feed-content table {
    max-width: 100%;
}

/* Сообщение об отсутствии публикаций */
.no-feeds {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-feeds p {
    margin: 0;
    font-size: 1.1rem;
}

/* Пагинация */
.feeds-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #dee2e6;
    color: #007bff;
    border-radius: 4px;
}

.pagination-link:hover {
    background-color: #e9ecef;
}

.pagination-link.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Сообщения об ошибках доступа */
.access-denied {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
    font-size: 1.1rem;
}

button:hover {
background-color: lab(100% 0.01 -0.01);
color: #0069d9;
}

.btn-primary:hover {
		top: 0;
}

.visibility-option {
		font-size: 0.8rem;
}


.modal-content-feeds {
    padding: 10px;
}



/* Адаптивность */
@media (max-width: 768px) {
	
    /* .feeds-container removed */

		.btn-sm {
		padding: 0;
		border-radius: 0;
		border: 0;
		}
.feed-form-container {
    background: #f8f9fa;
    border: 0 solid #e9ecef;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 10px;
}
.feed-form .form-group {
    margin-bottom: -20px;
}
    
    .feed-item {
        padding: 10px;
    }
}

/* Модальное окно редактирования */
.modal {
    display: none !important;
    position: fixed;
    z-index: 10000;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* Высота без учета шапки */
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.modal.show {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
    align-items: center;
}

/* Контент модалки - десктоп */
.modal-content-feeds {
    background-color: #fefefe;
    padding: 20px;
    border: none;
    width: 90%;
    max-width: 600px;
    max-height: calc(100% - 60px); /* Чтобы не выходило за границы видимости */
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Стилизация скроллбара для сохранения скругленных углов */
.modal-content-feeds::-webkit-scrollbar {
    width: 8px;
}

.modal-content-feeds::-webkit-scrollbar-track {
    background: transparent;
    margin: 12px 0; /* Отступы сверху и снизу чтобы не перекрывать скругление */
}

.modal-content-feeds::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-content-feeds::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}



.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

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

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#edit-quill-editor {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    min-height: 100px;
}

#edit-quill-editor .ql-toolbar {
    border: 1px solid #ced4da;
    border-bottom: none;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

#edit-quill-editor .ql-container {
    border: 1px solid #ced4da;
    font-size: 14px;
    border-radius: 0 0 4px 4px;
}

#edit-quill-editor .ql-editor {
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
		flex-direction: row;
		padding-top: 10px;
}

.visibility-selector {
    position: relative;
}

.btn-visibility {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-visibility:hover {
    background-color: #f0f2f5;
    color: #1c1e21;
}

.visibility-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
		left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    min-width: max-content;
    margin-bottom: 5px;
}

.visibility-menu.active {
    display: block;
}

.visibility-option {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin: 0;
    font-weight: normal;
    color: #1c1e21;
		font-size: 0.8rem;
}

.visibility-option:hover {
    background-color: #f2f2f2;
}

.visibility-option.selected {
    background-color: #e3f2fd;
    color: #1976d2;
}

.visibility-option input {
    display: none;
}

.visibility-option i {
    width: 20px;
    margin-right: 5px;
    color: #65676b;
}

.btn-secondary {
    color: #6c757d;
    background-color: #fff;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.feed-tags-categories {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.85rem;
}

.category-tag, .tag-tag {
    background: #f0f2f5;
    color: #65676b;
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e4e6ea;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.category-tag:hover, .tag-tag:hover {
    background: #e4e6ea;
    color: #1c1e21;
    text-decoration: underline;
}

.tag-tag {
    background: #e7f3ff;
    color: #1877f2;
    border-color: #d8e4f0;
}

.tag-tag:hover {
    background: #d8e4f0;
    text-decoration: underline;
}

.feed-footer {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.feed-footer-left {
    flex: 1 1 260px;
    min-width: 0;
}

.feed-footer-right {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
}

.feed-tags-categories {
    flex: 1;
}

.pin-selector {
    margin-left: 10px;
}

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

.btn-pin:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.btn-pin.active {
    color: #007bff;
    background-color: #e3f2fd;
}

.btn-pin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #adb5bd;
}

.btn-pin:disabled:hover {
    background-color: transparent;
    color: #adb5bd;
}

.feed-visibility-info {
    font-size: 0.8rem;
    color: #65676b;
}

.form-group {
    margin-bottom: 0px;
}

.categories-tags-section {
    margin-top: 15px;
    display: flex;
    gap: 20px;
}

.categories-section, .tags-section {
    flex: 1;
}

.categories-section label, .tags-section label {
    display: flex;
		align-items: center;
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

.custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.select-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.select-button:hover {
    border-color: #1877f2;
}

.select-button i {
    transition: transform 0.2s ease;
}

.custom-select.open .select-button i {
    transform: rotate(180deg);
}

.select-text {
    color: #6c757d;
		white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select.open .select-dropdown {
    display: block;
}

.select-options {
    padding: 8px 0;
}

.select-option {
    display: flex;
    align-items: center;
    padding: 2px 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.select-option:hover {
    background: #f8f9fa;
}

.select-option input[type="checkbox"] {
    margin-right: 8px;
}

.select-option span {
    font-size: 0.9rem;
}

.option-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.option-actions button {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.option-actions button:hover {
    background: #f8f9fa;
    color: #495057;
}

.option-actions .btn-delete-category:hover,
.option-actions .btn-delete-tag:hover {
    color: #dc3545;
}

.option-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 8px;
}

#new-category, #new-tag, #edit-new-category, #edit-new-tag {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 20px;
    font-size: 0.85rem;
    background: #f8f9fa;
    transition: border-color 0.2s ease;
}

#new-category:focus, #new-tag:focus, #edit-new-category:focus, #edit-new-tag:focus {
    outline: none;
    border-color: #1877f2;
    background: #fff;
}

.feeds-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: auto;
}

.filter-section label {
    font-weight: 600;
    color: #1c1e21;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-section select {
    padding: 8px 6px;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #f8f9fa;
    transition: border-color 0.2s ease;
}

.filter-section select:focus {
    outline: none;
    border-color: #1877f2;
    background: #fff;
}

#apply-filters, #clear-filters {
    padding: 8px 6px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

#apply-filters {
    background: #e9ecef;
    color: #374151;
}

#apply-filters:hover {
    background: #747bf5;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
		color: #ffffff;
}

#clear-filters {
    background: #e4e6ea;
    color: #1c1e21;
}

#clear-filters:hover {
    background: #d8dade;
}

@media (max-width: 480px){
.categories-section label, .tags-section label {
width: 100%;
}	

}


/* Стили для развернутой публикации */

/* Стили для развернутой публикации */

/* Стили для развернутой публикации */
.feed-item.expanded-view {
    border: 1px solid #28a745 !important;
    position: relative;
    padding-left: 20px !important; /* Больший отступ для индикатора */
    transition: border-color 0.3s ease, padding-left 0.3s ease;
}

.feed-progress-indicator {
    position: absolute;
    left: 1px; /* Внутри отступа */
    background-color: rgb(40 166 69);
    color: white;
    padding: 6px 0; /* Убираем боковые отступы */
    border-radius: 10px; /* Более скругленный для вертикального вида */
    font-size: 10px;
    cursor: pointer;
    transition: top 0.1s linear; /* Плавное движение */
    transform: translateY(-50%); /* Центрирование по вертикали относительно top */
    display: none; /* Скрыт по умолчанию */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 20;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    width: 16px; /* Узкий вертикальный блок */
}

.feed-collapse-icon {
    font-size: 10px;
    line-height: 1;
}

.feed-percent-text {
    font-weight: 600;
    font-size: 9px;
    writing-mode: vertical-rl; /* Вертикальный текст */
    text-orientation: mixed;
    transform: rotate(180deg); /* Чтобы читалось снизу вверх */
}

/* Триггер создания публикации (Fake Input) */
.feed-input-trigger {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.feed-input-trigger:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.trigger-avatar {
    flex-shrink: 0;
}

.trigger-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.trigger-avatar {
    width: auto;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
}

.trigger-input {
    flex-grow: 1;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 10px 16px;
    color: #65676b;
    font-size: 15px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    user-select: none;
}

.feed-input-trigger:hover .trigger-input {
    background-color: #e4e6eb;
}

.trigger-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.trigger-btn {
    background: none;
    border: none;
    color: #65676b;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    padding: 0;
}

.trigger-btn:hover {
    background-color: #f0f2f5;
    color: #1877f2;
}

/* Specific icon colors if needed */
.trigger-btn .fa-image {
    color: #45bd62;
}

.trigger-btn .fa-paper-plane {
    color: #f7b928; /* Or blue #1877f2 */
}

/* Management Modal Styles */
.mgmt-modal {
    padding: 0;
    overflow: hidden;
}

.mgmt-modal .modal-header {
    padding: 15px 20px;
    margin-bottom: 0;
}

.mgmt-grid {
    display: grid;
    grid-template-columns: auto;
    gap: 10px;
    padding: 10px;
    max-height: 70vh;
    overflow-y: auto;
    background: #f8f9fa;
}

.mgmt-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.mgmt-section h4 {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mgmt-section h4 i {
    color: #1877f2;
}

/* Stats Section */
.stats-cards {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.stats-card {
    flex: 1;
    background: #f0f7ff;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0056b3;
}

.stats-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}

.visibility-stats h5 {
    font-size: 0.8rem;
    margin: 0 0 8px 0;
    color: #6c757d;
}

.progress-stack {
    height: 10px;
    display: flex;
    border-radius: 5px;
    overflow: hidden;
    background: #e9ecef;
}

.progress-bar-item.all { background: #45bd62; }
.progress-bar-item.users { background: #1877f2; }
.progress-bar-item.subscribers { background: #f7b928; }

/* Scroll Lists */
.mgmt-scroll-list {
    max-height: 200px;
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 10px;
}

.mgmt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.85rem;
}

.mgmt-item-text {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.btn-unpin-mgmt {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.btn-unpin-mgmt:hover {
    background: #fff0f0;
}

/* Add Form */
.mgmt-add-form {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f3f4;
}

.mgmt-add-form input {
    flex-grow: 1;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.85rem;
}

.btn-icon-add {
    background: #1877f2;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-add:hover {
    background: #166fe5;
}

/* Footer */
.mgmt-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e9ecef;
}

.mgmt-actions-custom {
    display: flex;
    gap: 8px;
}

.btn-mgmt-custom {
    background: #f0f2f5;
    border: 1px solid #dddfe2;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b4f56;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-mgmt-custom:hover {
    background: #e4e6eb;
}

/* ===== MOBILE: учёт шапки (60px) и нижней навигации (60px) ===== */
@media (max-width: 768px) {
    .modal {
        /* Перезаписываем десктопный top: 60px — на мобиле шапка не sticky */
        top: 0;
        height: 100dvh;
        /* Безопасные зоны через padding */
        padding-top: 0;   /* высота .site-header на мобиле */
        padding-bottom: 0; /* высота .mobile-bottom-nav */
        align-items: flex-start;
        overflow-y: auto;
    }

    .modal.show {
        padding-top: 0;
        padding-bottom: 0;
    }

    .modal-content-feeds {
        width: 95%;
        max-height: calc(100dvh - 65px - 65px - 40px); /* dvh - header - bottom-nav - gaps */
        overflow-y: auto;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
    }

    /* Для management modal с grid-layout — разрешаем скроллировать grid */
    .mgmt-grid {
        max-height: calc(100dvh - 60px - 60px - 120px); /* minus header, nav, modal header+footer */
        overflow-y: auto;
    }

    .mgmt-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .mgmt-actions-custom {
        justify-content: stretch;
    }

    .mgmt-actions-custom .btn-mgmt-custom {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .mgmt-grid {
        grid-template-columns: 1fr;
    }
}

.gear-btn i {
    transition: transform 0.3s ease;
}

.gear-btn:hover i {
    transform: rotate(90deg);
}

/* Feed Gallery & Mosaic Layouts */
.feed-gallery {
    display: grid;
    gap: 4px;
    margin: 12px 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.feed-gallery a {
    display: block;
    position: relative;
    overflow: hidden;
}

.feed-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.feed-gallery a:hover img {
    transform: scale(1.04);
}

.feed-gallery .hidden-img {
    display: none;
}

/* 1 Image */
.feed-gallery.gallery-1 {
    grid-template-columns: 1fr;
}
.feed-gallery.gallery-1 a {
    max-height: 500px;
}

/* 2 Images */
.feed-gallery.gallery-2 {
    grid-template-columns: 1fr 1fr;
    aspect-ratio: 16 / 9;
}

/* 3 Images */
.feed-gallery.gallery-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16 / 9;
}
.feed-gallery.gallery-3 a:first-child {
    grid-row: span 2;
}

/* 4 Images & More */
.feed-gallery.gallery-4,
.feed-gallery.gallery-more {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    aspect-ratio: 1 / 1;
}

/* Overlay for 'More' */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    backdrop-filter: blur(2px);
    transition: background 0.3s ease;
}

.feed-gallery a:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0.5);
}

@media (max-width: 600px) {
    .feed-gallery.gallery-2,
    .feed-gallery.gallery-3,
    .feed-gallery.gallery-4,
    .feed-gallery.gallery-more {
        aspect-ratio: auto;
    }
    
    .feed-gallery.gallery-3 {
        grid-template-columns: 1fr 1fr;
    }
    
    .feed-gallery.gallery-3 a:first-child {
        grid-column: span 2;
        aspect-ratio: 16 / 9;
    }
}

.images-upload-section {
    margin: 10px 0 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.images-upload-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.image-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    padding: 0;
    border: none;
}

.btn-upload-trigger {
    width: max-content !important;
    padding: 6px 16px !important;
    font-size: 0.85rem !important;
    border-radius: 30px !important;
    margin: 0 !important;
    background: #495057 !important;
    border: 1px solid #343a40 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-upload-trigger:hover {
    background: #343a40 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.images-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.preview-item {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

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

.preview-item:hover img {
    transform: scale(1.1);
}

.btn-remove-preview, .btn-delete-existing {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.95);
    color: white;
    border: none;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    z-index: 2;
    transition: all 0.2s ease;
}

.btn-remove-preview:hover, .btn-delete-existing:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.loading-images {
    color: #666;
    font-size: 0.85rem;
    padding: 10px;
    text-align: center;
    width: 100%;
}

.preview-item.existing {
    border-color: rgba(13, 110, 253, 0.4);
}

.sortable-ghost {
    opacity: 0.4;
    background: #c8ebfb;
}

.existing-images {
    margin-bottom: 5px;
}

.existing-images {
    margin-bottom: 5px;
}

@media (max-width: 480px) {
    .feed-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
		.mgmt-grid {
    gap: 8px;
    padding: 5px;
}
.mgmt-section {
    padding: 6px;
}
}




/* Skeleton Loader Styles */
.feed-skeleton-item {
    background: #f0f2f5;
    background: linear-gradient(90deg, #f0f2f5 25%, #e6e8eb 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: feed-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes feed-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.feed-skeleton-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-skeleton-meta {
    height: 14px;
    width: 120px;
}

.feed-skeleton-actions {
    height: 24px;
    width: 60px;
}

.feed-skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-skeleton-line {
    height: 14px;
    width: 100%;
}

.feed-skeleton-line.mid { width: 85%; }
.feed-skeleton-line.short { width: 60%; }

.feed-skeleton-footer {
    height: 20px;
    width: 150px;
    margin-top: 5px;
}

/* === Moderation (reports) === */
.feed-moderation-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}
.feed-moderation-badge.moderation-under_review { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.feed-moderation-badge.moderation-hidden { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.feed-moderation-badge.moderation-removed { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }

.feed-report-btn { color: #6c757d; }
.feed-report-btn:hover { color: #dc3545; }
.feed-report-btn.reported { color: #28a745; cursor: default; }

.feed-report-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.feed-report-dialog {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}
.feed-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}
.feed-report-header h4 { margin: 0; font-size: 16px; }
.feed-report-close {
    background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #666;
}
.feed-report-body { padding: 14px 16px; }
.feed-report-body label { display: block; font-size: 13px; margin-bottom: 6px; color: #333; }
.feed-report-body select,
.feed-report-body textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}
.feed-report-body textarea { min-height: 70px; resize: vertical; }
.feed-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.feed-report-actions .btn-cancel {
    background: #f1f3f5; border: 1px solid #ddd; color: #333; padding: 7px 14px; border-radius: 6px; cursor: pointer;
}
.feed-report-actions .btn-submit {
    background: #dc3545; border: 0; color: #fff; padding: 7px 14px; border-radius: 6px; cursor: pointer;
}
.feed-report-actions .btn-submit:disabled { opacity: 0.6; cursor: default; }
.feed-report-error { color: #dc3545; font-size: 13px; margin-top: 4px; }
.feed-moderation-notice { font-size: 13px; }

/* === Engagement (likes/bookmarks/views/comments) === */
.feed-engagement {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-right: 8px;
	vertical-align: middle;
}
.feed-eng-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 6px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
	color: #6b7280;
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: all .15s ease;
}
.feed-eng-btn:hover { background: #f9fafb; color: #374151; border-color: #d1d5db; }
.feed-eng-btn.is-active { background: #fef2f2; color: #ef4444; border-color: #fecaca; }
.feed-eng-btn.is-active .fa-heart { color: #ef4444; }
.feed-bookmark-btn.is-active { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.feed-bookmark-btn.is-active .fa-bookmark { color: #2563eb; }
.feed-views { cursor: default; }
.feed-views:hover { background: #fff; color: #6b7280; border-color: #e5e7eb; }
.feed-eng-popover {
	position: absolute; z-index: 10060; background: #fff; border: 1px solid #e5e7eb;
	border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px; min-width: 180px; max-width: 260px;
}
.feed-eng-popover-title { font-size: 12px; color: #6b7280; padding: 4px 6px 6px; border-bottom: 1px solid #f3f4f6; margin-bottom: 4px; }
.feed-eng-popover-item { display:flex; align-items:center; gap:8px; padding:5px 6px; font-size:13px; color:#374151; border-radius:6px; }
.feed-eng-popover-item:hover { background:#f9fafb; }
.feed-eng-popover-item img { width:22px; height:22px; border-radius:50%; object-fit:cover; }
.feed-footer-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; margin-left: auto; }

/* === Feed comments (threaded) === */
.feed-comments-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef0f2; }
.feed-comments-header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.feed-comments-header h4 { margin:0; font-size:15px; font-weight:600; color:#374151; }
.feed-comments-header h4 i { color:#6b7280; margin-right:6px; }
.feed-comments-sort { display:flex; gap:4px; }
.feed-comments-sort-btn { border:1px solid #e5e7eb; background:#fff; color:#6b7280; font-size:12px; padding:4px 10px; border-radius:14px; cursor:pointer; }
.feed-comments-sort-btn.is-active { background:#eff6ff; color:#2563eb; border-color:#bfdbfe; }
.feed-comment-form textarea { width:100%; box-sizing:border-box; border:1px solid #e5e7eb; border-radius:8px; padding:8px 10px; font-size:14px; resize:vertical; min-height:52px; }
.feed-comment-form-actions { margin-top:6px; display:flex; justify-content:flex-end; }
.feed-comment-submit-btn { appearance:none; border:1px solid #d1d5db; background:#f9fafb; color:#374151; font-size:13px; font-weight:500; line-height:1.2; padding:6px 14px; border-radius:6px; cursor:pointer; transition:background .15s,border-color .15s,color .15s; }
.feed-comment-submit-btn:hover { background:#f3f4f6; border-color:#9ca3af; color:#111827; }
.feed-comment-submit-btn:active { background:#e5e7eb; }
.feed-comment-submit-btn:focus { outline:none; box-shadow:0 0 0 2px rgba(59,130,246,.18); }
.feed-comment-submit-btn:disabled { opacity:.6; cursor:default; }
.feed-comments-login-hint { font-size:13px; color:#6b7280; padding:8px 0; }
.feed-comments-list { margin-top:10px; }
.feed-comment { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid #f3f4f6; }
.feed-comment:last-child { border-bottom:0; }
.feed-comment.is-reply { margin-left:28px; padding-left:10px; border-left:2px solid #eef2ff; }
.feed-comment-avatar { width:32px; height:32px; border-radius:50%; background:#e5e7eb; flex:0 0 32px; overflow:hidden; display:flex; align-items:center; justify-content:center; color:#6b7280; font-size:13px; font-weight:600; }
.feed-comment-avatar img { width:100%; height:100%; object-fit:cover; }
.feed-comment-body { flex:1; min-width:0; }
.feed-comment-meta { display:flex; align-items:center; gap:8px; font-size:12px; color:#6b7280; margin-bottom:3px; flex-wrap:wrap; }
.feed-comment-author { font-weight:600; color:#374151; }
.feed-comment-text { font-size:14px; color:#1f2937; line-height:1.45; white-space:pre-wrap; word-break:break-word; }
.feed-comment-actions { margin-top:4px; display:flex; gap:10px; }
.feed-comment-action { background:none; border:0; padding:0; font-size:12px; color:#6b7280; cursor:pointer; }
.feed-comment-action:hover { color:#2563eb; }
.feed-comment-action.danger:hover { color:#dc2626; }
.feed-comments-empty { font-size:13px; color:#9ca3af; padding:6px 0; }
.feed-moderation-notice.moderation-under_review { background: #fff8e1; color: #7a5d00; border: 1px solid #ffe082; }
.feed-moderation-notice.moderation-hidden { background: #fdecea; color: #7a1f1a; border: 1px solid #f5c2c0; }
.feed-moderation-notice.moderation-removed { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }

/* === Repost / quote === */
.feed-repost-comment { font-size:14px; color:#1f2937; line-height:1.5; margin-bottom:8px; }
.feed-repost-comment p { margin: 0 0 8px; }
.feed-repost-comment p:last-child { margin-bottom: 0; }
.feed-repost-comment h1,.feed-repost-comment h2,.feed-repost-comment h3,.feed-repost-comment h4,.feed-repost-comment h5,.feed-repost-comment h6 { margin: 8px 0 6px; line-height: 1.3; }
.feed-repost-comment ul,.feed-repost-comment ol { margin: 6px 0 8px 20px; padding: 0; }
.feed-repost-comment blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid #d1d5db; color: #4b5563; background: #fff; }
.feed-repost-comment pre { margin: 6px 0; padding: 8px 10px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; overflow-x: auto; }
.feed-repost-comment code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: #f3f4f6; padding: 1px 4px; border-radius: 4px; }
.feed-repost-comment pre code { background: transparent; padding: 0; }
.feed-repost-comment a { color: #2563eb; text-decoration: underline; }
.feed-repost-comment hr { border: 0; border-top: 1px solid #e5e7eb; margin: 8px 0; }
.feed-repost-embed { border:1px solid #e5e7eb; border-left:3px solid #3b82f6; border-radius:8px; padding:10px 12px; background:#f9fafb; margin:8px 0 10px; }
.feed-repost-embed-header { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px; color:#6b7280; margin-bottom:4px; }
.feed-repost-embed-header .fa-retweet { color:#3b82f6; }
.feed-repost-author { font-weight:600; color:#374151; text-decoration:none; }
.feed-repost-author:hover { color:#2563eb; }
.feed-repost-date { font-size:12px; color:#9ca3af; }
.feed-repost-title { font-size:14px; font-weight:600; margin:2px 0 4px; }
.feed-repost-title a { color:#111827; text-decoration:none; }
.feed-repost-title a:hover { color:#2563eb; }
.feed-repost-text { font-size:13px; color:#4b5563; line-height:1.45; }
.feed-repost-unavailable { font-size:13px; color:#9ca3af; font-style:italic; }
.feed-repost-modal { display:none; position:fixed; inset:0; z-index:10080; background:rgba(0,0,0,.45); align-items:center; justify-content:center; }
.feed-repost-modal-content { width:100%; max-width:520px; margin:16px; background:#fff; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.2); overflow:visible; }
/* TinyMCE: контейнер плавающих UI поверх модалки репоста; внутреннюю иерархию (меню/диалоги) оставляет TinyMCE */
.tox-tinymce-aux { z-index: 10100 !important; }
.feed-repost-modal-header { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid #eee; }
.feed-repost-modal-header h4 { margin:0; font-size:16px; }
.feed-repost-close { background:none; border:0; font-size:22px; line-height:1; cursor:pointer; color:#666; }
.feed-repost-modal-body { padding:14px 16px; }
.feed-repost-modal-body label { display:block; font-size:13px; margin-bottom:6px; color:#333; }
.feed-repost-modal-body textarea { width:100%; box-sizing:border-box; padding:8px 10px; border:1px solid #ddd; border-radius:6px; font-size:14px; min-height:70px; resize:vertical; }
.feed-repost-hint { font-size:12px; color:#6b7280; margin-top:6px; }
.feed-repost-modal-actions { display:flex; justify-content:flex-end; gap:8px; padding:12px 16px; border-top:1px solid #eee; background:#fafafa; }
.feed-repost-modal-actions .btn-cancel { background:#f1f3f5; border:1px solid #ddd; color:#333; padding:7px 14px; border-radius:6px; cursor:pointer; }
.feed-repost-modal-actions .btn-submit { background:#2563eb; border:0; color:#fff; padding:7px 14px; border-radius:6px; cursor:pointer; }
.feed-repost-modal-actions .btn-submit:disabled { opacity:.6; cursor:default; }
.feed-repost-error { color:#dc3545; font-size:13px; margin-top:6px; min-height:18px; }
.feed-repost-btn .fa-retweet { color:#059669; }
.feed-repost-btn:hover .fa-retweet { color:#047857; }
.feed-repost-btn.is-active { background:#ecfdf5; color:#059669; border-color:#a7f3d0; }
.feed-repost-btn.is-active .fa-retweet { color:#059669; }
.feed-repost-btn[disabled] { opacity:.7; cursor:default; }



/* Copy button for code blocks in feeds */
.feed-code-block {
    position: relative;
    margin: 6px 0;
}
.feed-code-block pre {
    margin: 0;
}
.feed-code-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.9;
    z-index: 2;
}
.feed-code-copy-btn:hover { opacity: 1; background: #f9fafb; }
.feed-code-copy-btn.copied { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.feed-code-block pre code { display: block; padding-right: 72px; }
