/**
 * PC 浏览历史页面
 */

.route-history {
    background: #f4f6f9;
}

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

.ls-view-history-hero,
.ls-view-history-panel {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}

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

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

.ls-view-history-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-view-history-icon i {
    font-size: 25px;
}

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

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

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

.ls-view-history-clear {
    padding: 0 18px;
}

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

.ls-view-history-clear:hover,
.ls-view-history-more-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-view-history-clear:disabled,
.ls-view-history-more-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
    transform: none;
}

.ls-view-history-panel {
    margin-top: 14px;
    padding: 0;
    overflow: hidden;
}

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

.ls-view-history-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    font-size: 16px;
    font-weight: 700;
}

.ls-view-history-total {
    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-view-history-tip {
    color: #8b96a8;
    font-size: 13px;
}

.ls-view-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 20px 18px;
}

.ls-view-history-list > .ls-empty,
.ls-view-history-list > .ls-loading {
    grid-column: 1 / -1;
    min-height: 260px;
    background: #f8fafc;
    border: 1px dashed #d9e1ec;
    border-radius: 8px;
}

.ls-view-history-item {
    display: flex;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    color: inherit;
    text-decoration: none;
    border: 1px solid #e8edf3;
    border-radius: 8px;
    background: #fff;
    transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}

.ls-view-history-item:hover {
    border-color: rgba(59, 130, 246, .55);
    background: #fcfdff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    transform: translateY(-1px);
}

.ls-view-history-cover {
    position: relative;
    width: 112px;
    height: 74px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 7px;
    background: #f1f5f9;
}

.ls-view-history-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls-view-history-cover.has-image .ls-view-history-cover-placeholder {
    display: none;
}

.ls-view-history-cover.has-image.is-image-error .ls-view-history-cover-placeholder {
    display: flex;
}

.ls-view-history-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ls-primary, #3b82f6);
    background: linear-gradient(135deg, #dcecff 0%, #dff6ef 100%);
}

.ls-view-history-cover-placeholder i {
    font-size: 25px;
}

.ls-view-history-info {
    min-width: 0;
    flex: 1;
    height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ls-view-history-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ls-view-history-type {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    height: 23px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: calc(100% - 12px);
    padding: 0 9px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .88);
    color: #58677a;
    font-size: 12px;
    line-height: 23px;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.ls-view-history-type i {
    font-size: 15px;
}

.ls-view-history-time {
    flex: 0 0 auto;
    color: #8b96a8;
    font-size: 12px;
}

.ls-view-history-summary {
    color: #1f2937;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ls-view-history-meta {
    margin-top: 8px;
    color: #8792a5;
    font-size: 12px;
}

.ls-view-history-meta span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ls-view-history-meta i {
    width: 12px;
    height: 12px;
    font-size: 12px;
    line-height: 12px;
}

.ls-view-history-meta span:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-view-history-meta span:last-child {
    flex: 0 0 auto;
    color: #748199;
    transition: color .16s;
}

.ls-view-history-item:hover .ls-view-history-meta span:last-child {
    color: var(--ls-primary, #3b82f6);
}

.is-type-article .ls-view-history-type,
.is-type-words .ls-view-history-type {
    background: rgba(244, 247, 251, .9);
}

.is-type-video .ls-view-history-type {
    color: #7c3aed;
    background: rgba(244, 239, 255, .9);
}

.is-type-music .ls-view-history-type {
    color: #4f46e5;
    background: rgba(238, 242, 255, .9);
}

.is-type-voice .ls-view-history-type {
    color: #0f766e;
    background: rgba(236, 253, 245, .9);
}

.is-type-vote .ls-view-history-type {
    color: #b45309;
    background: rgba(255, 247, 237, .9);
}

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

@media (max-width: 860px) {
    .ls-view-history-page {
        width: calc(100vw - 28px);
    }

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

    .ls-view-history-list {
        grid-template-columns: 1fr;
    }
}
