/**
 * Стена - Стили (Reddit-like layout)
 */

.wall-layout {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Поиск */
.wall-search {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.wall-search-input {
    flex: 1;
    padding: 10px 16px;
    background: rgb(0 0 0 / 10%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #d7dadc;
    font-size: 0.95rem;
}

.wall-search-input:focus {
    outline: none;
    border-color: #e94560;
}

.wall-search-input::placeholder {
    color: #818384;
}

.wall-search-btn {
    padding: 10px 16px;
    background: #e94560;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wall-search-btn:hover {
    background: #ff6b81;
}

/* Левая панель - Навигация */
.wall-sidebar-left {
    width: 240px;
    flex-shrink: 0;
}

.wall-nav {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.wall-nav-header {
    padding: 12px 16px;
    background: rgba(30, 30, 50, 0.5);
    font-weight: 600;
    font-size: 0.85rem;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wall-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #e0e0e0;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wall-nav-item:last-child {
    border-bottom: none;
}

.wall-nav-item:hover {
    background: rgba(30, 30, 50, 0.5);
}

.wall-nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid #e94560;
}

.wall-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wall-nav-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Основная область */
.wall-main {
    flex: 1;
    min-width: 0;
    padding: 0;
}

.wall-header-main {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.wall-header-main h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #e0e0e0;
}

.wall-header-search {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 400px;
}

.wall-header-search .wall-search-input {
    flex: 1;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #d7dadc;
    font-size: 0.9rem;
}

.wall-header-search .wall-search-input:focus {
    outline: none;
    border-color: #e94560;
}

.wall-header-search .wall-search-input::placeholder {
    color: #818384;
}

.wall-header-search .wall-search-btn {
    padding: 8px 14px;
    background: #e94560;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wall-header-search .wall-search-btn:hover {
    background: #ff6b81;
}

.wall-header-main .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Посты */
.wall-posts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wall-post {
    display: flex;
    flex-direction: column;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.wall-post:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.wall-post-vote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(20, 20, 35, 0.5);
}

.wall-post-vote button {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.wall-post-vote button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.wall-post-vote button.up:hover {
    color: #ff4500;
}

.wall-post-vote button.down:hover {
    color: #7193ff;
}

.wall-post-vote span {
    font-weight: 700;
    font-size: 0.8rem;
    color: #e0e0e0;
}

.wall-post-content {
    flex: 1;
    padding: 12px;
    min-width: 0;
}

.wall-post-title-link {
    text-decoration: none;
    display: block;
}

.wall-post-title-link:hover .wall-post-title {
    color: #e94560;
}

.wall-post-channel {
    color: #888;
    text-decoration: none;
    font-weight: 600;
}

.wall-post-channel:hover {
    text-decoration: underline;
}

.wall-post-footer {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 16px;
}

.wall-post-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
}

.wall-post-stats:hover {
    color: #e0e0e0;
}

.wall-post-stats svg {
    width: 18px;
    height: 18px;
}

.wall-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 6px;
}

.wall-post-meta a {
    color: #888;
    text-decoration: none;
    font-weight: 600;
}

.wall-post-meta a:hover {
    text-decoration: underline;
}

.wall-post-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0e0;
    text-decoration: none;
    margin-bottom: 6px;
    line-height: 1.4;
}

.wall-post-title:hover {
    color: #e94560;
}

.wall-post-preview {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wall-post-image {
    width: 140px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 12px;
    background: rgba(30, 30, 50, 0.5);
}

.wall-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wall-post-pinned {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e94560 0%, #c44a3d 100%);
    color: white;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

.wall-post-pinned svg {
    width: 14px;
    height: 14px;
}

.wall-post-banner {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    margin-bottom: 16px;
}

.wall-post-banner-link {
    display: block;
    text-decoration: none;
}

.wall-post-banner-link:hover .wall-post-banner-title {
    color: #e94560;
}

.wall-post-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wall-post-banner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.wall-post-banner-info {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 1;
}

.wall-post-banner-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.wall-post-banner-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Правая панель */
.wall-sidebar-right {
    width: 280px;
    flex-shrink: 0;
}

.wall-widget {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
}

.wall-widget-header {
    padding: 12px 16px;
    background: rgba(30, 30, 50, 0.5);
    font-weight: 600;
    font-size: 0.9rem;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wall-widget-body {
    padding: 16px;
}

.wall-sub-info {
    text-align: center;
}

.wall-sub-icon-lg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560 0%, #c44a3d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.wall-sub-icon-lg svg {
    width: 32px;
    height: 32px;
    color: white;
}

.wall-sub-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.wall-sub-desc {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
    line-height: 1.5;
}

.wall-sub-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wall-stat {
    text-align: center;
}

.wall-stat-value {
    font-weight: 700;
    font-size: 1rem;
    color: #e0e0e0;
}

.wall-stat-label {
    font-size: 0.75rem;
    color: #888;
}

.wall-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wall-rules-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #888;
}

.wall-rules-list li:last-child {
    border-bottom: none;
}

/* Пагинация */
.wall-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 16px;
}

.wall-pagination a {
    padding: 8px 16px;
    background: #e94560;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.wall-pagination a:hover {
    background: #ff6b81;
}

.wall-pagination span {
    color: #888;
    font-size: 0.9rem;
}

/* Комментарии */
.wall-comments-section {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    margin-top: 16px;
}

.wall-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wall-comments-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #e0e0e0;
}

.wall-comment-form {
    margin-bottom: 20px;
}

.wall-comment-form-actions label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
}

.wall-comments-list {
    display: flex;
    flex-direction: column;
}

.wall-comment {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wall-comment:last-child {
    border-bottom: none;
}

.wall-comment-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.wall-comment-vote button {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 0.9rem;
    padding: 2px;
}

.wall-comment-vote button:hover {
    color: #e0e0e0;
}

.wall-comment-body {
    flex: 1;
    min-width: 0;
}

.wall-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.wall-comment-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.wall-comment-date {
    font-size: 0.75rem;
    color: #888;
}

.wall-comment-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wall-comment-header .comment-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.wall-comment-md {
    background: linear-gradient(135deg, #e94560 0%, #c44a3d 100%);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

.wall-comment-text {
    font-size: 0.9rem;
    color: #e0e0e0;
    line-height: 1.5;
}

.wall-comment-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
}

.wall-comment-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.wall-comment-actions button:hover {
    color: #e94560;
    background: rgba(233, 69, 96, 0.1);
}

.wall-comment-edit-form {
    margin-top: 10px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #e94560;
    color: white;
}

.btn-primary:hover {
    background: #ff6b81;
}

.btn-secondary {
    background: rgba(30, 30, 50, 0.5);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Адаптивность */
@media (max-width: 900px) {
    .wall-layout {
        flex-direction: column;
    }

    .wall-sidebar-left,
    .wall-sidebar-right {
        width: 100%;
    }

    .wall-nav {
        position: static;
    }

    .wall-post-image {
        display: none;
    }
}

@media (max-width: 600px) {
    .wall-layout {
        padding: 10px;
    }

    .wall-post-vote {
        width: 32px;
    }
}

.wall-comment-form textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 8px 8px;
    color: #e0e0e0;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
}

.wall-comment-form textarea:focus {
    outline: none;
    border-color: #e94560;
}

.wall-comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.wall-comment-form-actions span {
    color: #888;
    font-size: 0.85rem;
}

/* Модальные окна */
.wall-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wall-modal-content {
    background: #1a1a1b;
    border: 1px solid #343536;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.wall-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #343536;
}

.wall-modal-header h2 {
    margin: 0;
    color: #d7dadc;
    font-size: 1.1rem;
}

.wall-modal-close {
    background: none;
    border: none;
    color: #818384;
    font-size: 1.5rem;
    cursor: pointer;
}

.wall-modal-body {
    padding: 16px;
}

.wall-form-group {
    margin-bottom: 16px;
}

.wall-form-group label {
    display: block;
    color: #d7dadc;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.wall-form-group input[type="text"],
.wall-form-group textarea {
    width: 100%;
    padding: 10px;
    background: #272729;
    border: 1px solid #343536;
    border-radius: 4px;
    color: #d7dadc;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.wall-form-group input[type="text"]:focus,
.wall-form-group textarea:focus {
    outline: none;
    border-color: #e94560;
}

/* Кнопки действий поста */
.wall-post-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.wall-post-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wall-post-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.wall-post-action-btn-active {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.wall-post-action-btn-active:hover {
    background: rgba(233, 69, 96, 0.3);
    color: #ff6b81;
}
