/* Премиальные стили для правого сайдбара */

.right-sidebar {
    gap: 20px;
}

/* Общий блок сайдбара */
.sb-block {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}


.sb-block.collapsed {
    border-radius: 8px;
    border: none;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Заголовок блока */
.sb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    transition: margin 0.3s, padding 0.3s, border 0.3s;
}

.sb-block.collapsed .sb-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sb-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.sb-title-icon {
    color: #3498db;
    font-size: 1rem;
    opacity: 0.9;
}

.sb-pin-icon {
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
    opacity: 0.5;
}

.sb-pin-icon:hover {
    color: #3498db;
    opacity: 1;
}

.sb-pin-icon.pinned-active {
    color: #f39c12 !important;
    opacity: 1 !important;
    transform: rotate(-45deg);
}

/* Облако тегов в сайдбаре */
.sb-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sb-tag-link {
    background: #f1f5f9;
    color: #475569;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sb-tag-link:hover {
    background: #3498db;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.sb-tag-count {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 4px;
}

/* Списки пользователей */
.sb-user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sb-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sb-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 1;
}

.sb-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}

.sb-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sb-user-name {
    color: #1e293b;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.sb-user-info:hover .sb-user-name {
    color: #3498db;
}

.sb-user-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* Последние комментарии */
.sb-comment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sb-comment-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f1f5f9;
}

.sb-comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sb-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
}

.sb-comment-author {
    color: #1e293b;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sb-comment-author:hover {
    color: #3498db;
}

.sb-comment-date {
    color: #94a3b8;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.sb-comment-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #475569;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    font-style: italic;
}

.sb-comment-article {
    font-size: 0.8rem;
}

.sb-comment-article a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Кнопки в сайдбаре */
.sb-footer-action {
    margin-top: 16px;
    text-align: center;
}

.sb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
		box-sizing: border-box;
}

.sb-btn:hover {
    background: #fff;
    color: #3498db;
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.1);
}

/* Адаптивность */
@media (max-width: 768px) {
	.sidebar-section > div.collapsed {
    max-height: 44px!important;
	}
    .sb-block {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        border-radius: 6px;
        padding: 12px;
        border: 1px solid #eef1f5;
        margin-bottom: 0;
				background-color: #f7f9fb;
    }

    .sb-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .sb-title {
        font-size: 0.8rem;
    }

    .sb-block.collapsed {
        max-height: 54px !important;
        overflow: hidden;
        border-radius: 8px; 
        padding-top: 0;
        padding-bottom: 0;
        display: flex;
        align-items: center;
    }
}
