/* 数据导出样式 */

/* ==================== 导出按钮 ==================== */

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-export i {
    font-size: 14px;
}

/* ==================== 导出格式选项 ==================== */

.export-format-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-option:hover {
    border-color: var(--primary-color);
    background: var(--hover-color, rgba(79, 70, 229, 0.05));
    transform: translateX(4px);
}

.export-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.export-info {
    flex: 1;
    min-width: 0;
}

.export-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.export-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.export-option > i.fa-chevron-right {
    color: var(--text-tertiary);
    font-size: 14px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.export-option:hover > i.fa-chevron-right {
    opacity: 1;
    transform: translateX(4px);
    color: var(--primary-color);
}

/* ==================== 导出进度指示 ==================== */

.export-progress {
    padding: 20px;
    text-align: center;
}

.export-progress-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.export-progress-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== 导出成功提示 ==================== */

.export-success {
    padding: 20px;
    text-align: center;
}

.export-success i {
    font-size: 64px;
    color: var(--success-color);
    margin-bottom: 16px;
}

.export-success h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.export-success p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== 导出按钮组 ==================== */

.export-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.export-buttons .btn {
    white-space: nowrap;
}

/* ==================== 导出下拉菜单 ==================== */

.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
}

.export-dropdown.active .export-dropdown-menu {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.export-dropdown-item:hover {
    background: var(--hover-color, rgba(79, 70, 229, 0.05));
}

.export-dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

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

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

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .export-format-options {
        gap: 10px;
    }

    .export-option {
        padding: 12px;
        gap: 12px;
    }

    .export-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .export-info h4 {
        font-size: 15px;
    }

    .export-info p {
        font-size: 12px;
    }

    .export-buttons {
        flex-wrap: wrap;
    }

    .btn-export {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .export-option {
        padding: 10px;
    }

    .export-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .export-info h4 {
        font-size: 14px;
    }
}

/* ==================== 深色模式 ==================== */

@media (prefers-color-scheme: dark) {
    .export-option {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .export-option:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .export-dropdown-menu {
        background: rgba(30, 30, 30, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .export-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ==================== 导出动画 ==================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.export-option {
    animation: slideIn 0.3s ease-out backwards;
}

.export-option:nth-child(1) { animation-delay: 0.05s; }
.export-option:nth-child(2) { animation-delay: 0.1s; }
.export-option:nth-child(3) { animation-delay: 0.15s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .export-option,
    .export-dropdown-menu {
        animation: none;
    }
}
