﻿/* 暂存夹功能样式 */

/* add-stack 点击反馈 */
.add-stack.stack-added {
    color: #00a9e0 !important;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

/* 暂存夹弹框 */
.stack-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.stack-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.stack-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.stack-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.stack-modal-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.stack-modal-close:hover {
    color: #333;
}

.stack-modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.stack-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 16px;
}

.stack-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stack-table thead th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.stack-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    vertical-align: middle;
}

.stack-table tbody tr:hover {
    background: #fafafa;
}

/* 数量调整 */
.stack-qty {
    white-space: nowrap;
}

.stack-qty-minus,
.stack-qty-plus {
    width: 28px;
    height: 28px;
    border: 1px solid #d0d0d0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    line-height: 1;
    transition: all 0.2s;
    vertical-align: middle;
}

.stack-qty-minus:hover:not(:disabled),
.stack-qty-plus:hover {
    border-color: #00a9e0;
    color: #00a9e0;
}

.stack-qty-minus:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.stack-qty-num {
    display: inline-block;
    width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    vertical-align: middle;
}

/* 删除按钮 */
.stack-item-remove {
    padding: 4px 12px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #999;
    transition: all 0.2s;
}

.stack-item-remove:hover {
    border-color: #e53935;
    color: #e53935;
}

/* 底部按钮 */
.stack-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
}

.btn-stack-clear,
.btn-stack-export {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-stack-clear {
    background: #fff;
    border: 1px solid #d0d0d0;
    color: #666;
}

.btn-stack-clear:hover {
    border-color: #e53935;
    color: #e53935;
}

.btn-stack-export {
    background: #00a9e0;
    border: 1px solid #00a9e0;
    color: #fff;
}

.btn-stack-export:hover {
    background: #0090c0;
    border-color: #0090c0;
}

/* 侧边栏暂存夹计数高亮 */
.sider .stack-count #stack-counts {
    background: #f33;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    position: absolute;
    right: -4px;
    top: -4px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    width: 16px;
    font-style: normal;
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .stack-modal {
        width: 96%;
        max-height: 90vh;
    }
    
    .stack-modal-body {
        padding: 12px;
    }
    
    .stack-table {
        font-size: 12px;
    }
    
    .stack-table thead th,
    .stack-table tbody td {
        padding: 8px 6px;
    }
}


/* ===== Toast ===== */
#stack-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 99999;
    display: none;
    pointer-events: none;
    white-space: nowrap;
}