/**
 * 批量操作组件样式
 */

/* 批量操作工具栏 */
.batch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    gap: 16px;
}

.batch-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.batch-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 全选复选框 */
.batch-checkbox-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    user-select: none;
}

.batch-checkbox-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* 已选择计数 */
.batch-selected-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* 批量操作按钮 */
.batch-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.batch-action-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.batch-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 项目复选框 */
.batch-item-checkbox {
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.batch-item-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* 可选择的项目 */
.batch-selectable {
    position: relative;
    transition: background-color 0.2s;
}

.batch-selectable:hover {
    background-color: #f8fafc;
}

.batch-selectable.selected {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

/* 导出按钮下拉菜单 */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    min-width: 160px;
}

.export-dropdown:hover .export-dropdown-content {
    display: block;
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.export-dropdown-item:hover {
    background-color: #f8fafc;
}

.export-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.export-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* 表格排序 */
.sort-icon {
    display: inline-block;
    font-size: 12px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

th[data-sortable]:hover .sort-icon {
    opacity: 1;
}

/* 响应式 */
@media (max-width: 768px) {
    .batch-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .batch-toolbar-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .batch-action-btn {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.export-dropdown-content {
    animation: fadeIn 0.2s ease;
}
