/* =============================================
   Selection Panel — 底部选中操作栏
   ============================================= */

#selection-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    pointer-events: none;
}
.sp-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 12px 16px 24px;
    background-color: rgba(39, 39, 39, 0.9);
    border-top: 0.5px solid rgba(64, 64, 64, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    pointer-events: auto;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 200ms ease, opacity 200ms ease;
}

/* 桌面端：内容区用 padding-left 避让左侧栏 */
@media (min-width: 769px) {
    .sp-panel { padding-left: 284px; }
}

.sp-panel.visible {
    transform: translateY(0);
    opacity: 1;
}


/* ── 左侧：缩略图 + 计数 ── */
.sp-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.sp-thumb-stack {
    position: relative;
    display: none;
    width: 56px;
    height: 48px;
    align-items: center;
    justify-content: center;
}

@media (min-width: 769px) {
    .sp-thumb-stack {
        display: flex;
    }
}

.sp-thumb-item {
    position: absolute;
}

.sp-thumb-ring {
    position: relative;
    display: flex;
    width: 40px;
    height: 48px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px #ffffff;
}

.sp-thumb-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
}

.sp-count-num {
    font-variant-numeric: tabular-nums;
}

/* ── 中间：操作按钮组 ── */
.sp-actions {
    display: none;
    align-items: center;
    gap: 10px;
}

@media (min-width: 1024px) {
    .sp-actions {
        display: flex;
    }
}

/* ── 右侧：删除 + 关闭 ── */
.sp-right {
    display: none;
    align-items: center;
    gap: 10px;
}

@media (min-width: 1024px) {
    .sp-right {
        display: flex;
    }
}

/* ── 按钮基础 ── */
.sp-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
    border-radius: 8px;
    border: 0.5px solid rgba(64, 64, 64, 0.5);
    outline: none;
    cursor: pointer;
    transition: all 150ms ease;
}

@media (min-width: 1024px) {
    .sp-btn {
        padding: 8px 16px;
    }
}

.sp-btn:active {
    transform: scale(0.98);
}

.sp-btn > svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sp-btn-label {
    display: none;
}

@media (min-width: 1024px) {
    .sp-btn-label {
        display: inline;
    }
}

/* 蓝色主按钮 */
.sp-btn--primary {
    color: #ffffff;
    background-color: #3b82f6;
    border-color: transparent;
}
.sp-btn--primary:hover {
    background-color: #1d4ed8;
}

/* 深色按钮 */
.sp-btn--dark {
    color: #ffffff;
    background-color: #1f1f1f;
    border-color: rgba(64, 64, 64, 0.5);
}
.sp-btn--dark:hover {
    background-color: #404040;
}

/* 危险按钮 */
.sp-btn--danger {
    padding: 10px 10px;
    color: #ffffff;
    background-color: #dc2626;
    border-color: #dc2626;
}
.sp-btn--danger:hover {
    background-color: #b91c1c;
    border-color: #dc2626;
}

/* 透明按钮 */
.sp-btn--ghost {
    color: #ffffff;
    background-color: transparent;
    border-color: transparent;
    padding: 10px;
}
.sp-btn--ghost:hover {
    background-color: #1f1f1f;
    border-color: #1f1f1f;
}

/* 纯图标按钮（桌面大屏也隐藏文字） */
.sp-btn--icon-only {
    padding: 10px;
}
.sp-btn--icon-only-lg {
    padding: 10px;
}
@media (min-width: 1024px) {
    .sp-btn--icon-only-lg {
        padding: 10px 16px;
    }
}
