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

.feeds-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.feeds-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

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

.feed-form .form-group {
    margin-bottom: 15px;
}

.feed-form label {
    display: block;
    margin-bottom: 8px;
    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: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.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.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

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

.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;
}

.feed-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

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

.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 0 10px 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;
}

/* Сообщение об отсутствии публикаций */
.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;
}

/* Адаптивность */
@media (max-width: 768px) {
    .feeds-container {
        padding: 10px;
    }
    
    .feed-form-container {
        padding: 15px;
    }
    
    .feed-item {
        padding: 12px;
    }
    
    .feeds-title {
        font-size: 1.25rem;
    }
}

/* Модальное окно редактирования */
.modal {
    display: none !important;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: 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;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
		display: block;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.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: 1.25rem;
    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: 15px;
}

.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;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px 0;
    display: none;
    z-index: 1000;
    min-width: 200px;
    margin-bottom: 5px;
}

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

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

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

.visibility-option input {
    margin-right: 10px;
}

.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-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

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