/**
 * PC 我的收藏页面
 */

.route-favorites {
    background: #f4f6f9;
}

.ls-favorites-page {
    width: min(1120px, calc(100vw - 48px));
    margin: 28px auto 56px;
}

.ls-favorites-hero,
.ls-favorites-shell {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}

.ls-favorites-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
}

.ls-favorites-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ls-favorites-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: var(--ls-primary, #3b82f6);
    background: #edf4ff;
}

.ls-favorites-icon i {
    font-size: 25px;
}

.ls-favorites-hero h1 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: 0;
}

.ls-favorites-hero p {
    margin: 7px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.ls-favorites-create,
.ls-favorites-more-btn,
.ls-favorites-uncollect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    border: 1px solid #d6dee8;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s, color .16s, border-color .16s, box-shadow .16s, transform .16s;
}

.ls-favorites-create {
    padding: 0 18px;
}

.ls-favorites-more-btn {
    min-width: 148px;
    padding: 0 20px;
}

.ls-favorites-uncollect-btn {
    height: 30px;
    padding: 0 11px;
    color: #64748b;
    background: #f8fafc;
}

.ls-favorites-create:hover,
.ls-favorites-more-btn:hover,
.ls-favorites-uncollect-btn:hover {
    border-color: rgba(59, 130, 246, .55);
    color: var(--ls-primary, #3b82f6);
    background: #f7fbff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}

.ls-favorites-create:disabled,
.ls-favorites-more-btn:disabled,
.ls-favorites-uncollect-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
    transform: none;
}

.ls-favorites-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 0;
    margin-top: 14px;
    overflow: hidden;
}

.ls-favorites-sidebar {
    min-height: 560px;
    padding: 18px 14px;
    border-right: 1px solid #edf1f6;
    background: #fbfcfe;
}

.ls-favorites-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px 12px;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.ls-favorites-sidebar-head em {
    min-width: 24px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--ls-primary, #3b82f6);
    font-size: 12px;
    font-style: normal;
}

.ls-favorites-folder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ls-favorites-folder-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ls-favorites-folder-item {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    text-align: left;
    transition: background .16s, border-color .16s, color .16s;
}

.ls-favorites-folder-row.is-custom .ls-favorites-folder-item {
    flex: 1;
    min-width: 0;
}

.ls-favorites-folder-item:hover {
    border-color: #dbe6f4;
    background: #fff;
    color: #1f2937;
}

.ls-favorites-folder-item.is-active {
    border-color: rgba(59, 130, 246, .35);
    background: #edf4ff;
    color: var(--ls-primary, #3b82f6);
}

.ls-favorites-folder-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 7px;
    background: #f1f5f9;
}

.ls-favorites-folder-item.is-active .ls-favorites-folder-icon {
    background: #fff;
}

.ls-favorites-folder-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.ls-favorites-folder-count {
    min-width: 24px;
    text-align: right;
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

.ls-favorites-folder-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.ls-favorites-folder-action {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background .16s, border-color .16s, color .16s;
}

.ls-favorites-folder-action:hover {
    border-color: #dbe6f4;
    background: #fff;
    color: var(--ls-primary, #3b82f6);
}

.ls-favorites-folder-delete:hover {
    border-color: rgba(239, 68, 68, .28);
    background: #fff5f5;
    color: #ef4444;
}

.ls-favorites-panel {
    min-width: 0;
    padding: 0;
}

.ls-favorites-toolbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #edf1f6;
}

.ls-favorites-current {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ls-favorites-current-name {
    color: #111827;
    font-size: 18px;
    line-height: 1.3;
}

.ls-favorites-current-count {
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--ls-primary, #3b82f6);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.ls-favorites-current-desc {
    margin: 6px 0 0;
    color: #8b96a8;
    font-size: 13px;
}

.ls-favorites-post-list {
    min-height: 420px;
    padding: 18px 20px;
}

.ls-favorites-post-list > .ls-empty,
.ls-favorites-post-list > .ls-loading {
    min-height: 300px;
    background: #f8fafc;
    border: 1px dashed #d9e1ec;
    border-radius: 8px;
}

.ls-favorites-post-list .ls-post-item {
    border: 1px solid #e8edf3;
    box-shadow: none;
}

.ls-favorites-post-list .ls-post-item + .ls-post-item {
    margin-top: 14px;
}

.ls-favorites-post-list .ls-post-header {
    padding-right: 96px;
}

.ls-favorites-uncollect-btn {
    position: absolute;
    top: 16px;
    right: 46px;
    z-index: 3;
}

.ls-favorites-more {
    display: flex;
    justify-content: center;
    padding: 0 20px 22px;
}

.ls-favorites-more.ls-hidden {
    display: none;
}

@media (max-width: 900px) {
    .ls-favorites-page {
        width: min(100%, calc(100vw - 28px));
    }

    .ls-favorites-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .ls-favorites-shell {
        grid-template-columns: 1fr;
    }

    .ls-favorites-sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #edf1f6;
    }

    .ls-favorites-folder-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .ls-favorites-folder-row {
        flex: 0 0 auto;
    }

    .ls-favorites-folder-item {
        min-width: 150px;
        flex: 0 0 auto;
    }
}
