/* ==========================================================================
   播放记录（头部触发器 + 弹窗列表）
   前缀统一用 pr- ，避免和主题里的 .list-unstyled / .modal 之类撞车
   ========================================================================== */

/* ---------- 头部触发器 ---------- */
.pr-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    cursor: pointer;
    color: inherit;
}

.pr-trigger:hover {
    color: #ea2c58;
}

.pr-trigger-cover {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    object-fit: cover;
    flex: 0 0 22px;
    background: #eee;
}

.pr-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-trigger-empty {
    color: #999;
    cursor: default;
}

.pr-trigger-empty:hover {
    color: #999;
}

/* ---------- 弹窗 ---------- */
.pr-body {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 8px;
}

.pr-item {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 9px 28px 9px 9px; /* 右侧留出删除按钮的位置 */
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s ease;
}

.pr-item:hover {
    background: #faf7f8;
}

/* 当前正在播放的那一条 */
.pr-item.is-current {
    background: #fff2f5;
}

.pr-cover {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 6px;
    object-fit: cover;
    background: #eee;
}

.pr-main {
    flex: 1 1 auto;
    min-width: 0;
}

.pr-title {
    font-size: 14px;
    line-height: 1.4;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-item.is-current .pr-title {
    color: #ea2c58;
}

.pr-sub {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 进度条：只有拿到过 duration 的记录才显示 */
.pr-bar {
    height: 3px;
    margin-top: 8px;
    border-radius: 2px;
    background: #eee;
    overflow: hidden;
}

.pr-bar > i {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: #ea2c58;
}

.pr-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    color: #aaa;
}

.pr-del {
    position: absolute;
    top: 6px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #c8c8c8;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
}

.pr-del:hover {
    color: #ea2c58;
    background: rgba(234, 44, 88, .08);
}

.pr-empty {
    padding: 40px 12px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.pr-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.pr-clear {
    padding: 0;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 12px;
    cursor: pointer;
}

.pr-clear:hover {
    color: #ea2c58;
}

.pr-tip {
    font-size: 11px;
    color: #bbb;
}

/* 手机上调小一点，别把弹窗撑破 */
@media (max-width: 480px) {
    .pr-cover {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .pr-title {
        font-size: 13px;
    }
}
