/* xnx_latest_posts - 最新评论侧栏样式 */
.xnx-lp-card {
    margin-bottom: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius, .5rem);
    background: var(--bs-body-bg);
    overflow: hidden;
}

.xnx-lp-header {
    display: flex !important;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: rgba(var(--bs-primary-rgb), .04);
    font-weight: 700;
    font-size: .95rem;
    color: var(--bs-body-color);
}

.xnx-lp-header i {
    color: var(--bs-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.xnx-lp-body {
    padding: .25rem .5rem !important;
}

.xnx-lp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.xnx-lp-item {
    display: flex;
    gap: .65rem;
    padding: .8rem .6rem !important;
    margin-bottom: 0 !important;
    /* 双层横线：border + ::after 渐变伪元素，保证一定能看到 */
    border-bottom: 1px solid var(--bs-border-color) !important;
    border-bottom-color: rgba(127, 127, 127, .28) !important;
    border-radius: 0 !important;
    transition: background-color .15s ease;
    position: relative;
}

.xnx-lp-item:last-child {
    border-bottom: 0 !important;
}

.xnx-lp-item:not(:last-child)::after {
    content: "" !important;
    position: absolute !important;
    left: 10%;
    right: 10%;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0,
        var(--bs-border-color) 15%,
        var(--bs-border-color) 85%,
        transparent 100%
    );
    opacity: .85 !important;
    display: block !important;
    pointer-events: none;
}

.xnx-lp-item:hover {
    background: rgba(var(--bs-primary-rgb), .03);
}

.xnx-lp-avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: flex-start;
    padding-top: 2px;
}

.xnx-lp-avatar img,
.xnx-lp-avatar .avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover;
    border: 1px solid var(--bs-border-color);
}

.xnx-lp-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.xnx-lp-text {
    display: block;
    font-size: .85rem;
    line-height: 1.5;
    color: var(--bs-body-color);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    transition: color .15s ease;
}

.xnx-lp-text:hover {
    color: var(--bs-primary);
    text-decoration: none;
}

.xnx-lp-meta {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    color: var(--bs-secondary-color);
    flex-wrap: wrap;
    line-height: 1.4;
}

.xnx-lp-user {
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xnx-lp-user:hover {
    text-decoration: underline;
    color: var(--bs-primary);
}

.xnx-lp-sep {
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}

.xnx-lp-thread {
    color: var(--bs-secondary-color);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    transition: color .15s ease;
}

.xnx-lp-thread:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.xnx-lp-time {
    color: var(--bs-secondary-color);
    margin-left: auto;
    white-space: nowrap;
    font-size: .72rem;
    flex-shrink: 0;
}

/* 无头像时的样式 */
.xnx-lp-item:not(:has(.xnx-lp-avatar)) .xnx-lp-content {
    gap: .15rem;
}

/* 响应式：移动端隐藏（与侧边栏整体保持一致） */
@media (max-width: 1199.98px) {
    .xnx-lp-card {
        display: none;
    }
}
