/**
 * 统一加载状态样式
 * 与 order.html 的加载样式保持一致
 * 
 * 使用方法：
 * 1. 引入此文件：<link href="/assets/css/loading.css" rel="stylesheet">
 * 2. HTML结构：
 *    <div class="loading-state">
 *        <div class="loading-icon">
 *            <i data-lucide="loader-2" class="rotating"></i>
 *        </div>
 *        <div class="loading-text">加载中...</div>
 *    </div>
 */

/* ============================================
   1. 加载状态容器
   ============================================ */
.loading-state {
    text-align: center;
    padding: 80px 20px;
}

/* ============================================
   2. 加载图标容器
   ============================================ */
.loading-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f3f4f6;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.loading-icon svg,
.loading-icon i {
    width: 40px;
    height: 40px;
}

/* ============================================
   3. 加载文字
   ============================================ */
.loading-text {
    font-size: 16px;
    color: #6b7280;
}

/* ============================================
   4. 旋转动画
   ============================================ */
@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotating 1s linear infinite;
}

/* ============================================
   5. 小型加载状态（用于按钮、卡片等）
   ============================================ */
.loading-state-sm {
    text-align: center;
    padding: 40px 20px;
}

.loading-state-sm .loading-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.loading-state-sm .loading-icon svg,
.loading-state-sm .loading-icon i {
    width: 24px;
    height: 24px;
}

.loading-state-sm .loading-text {
    font-size: 14px;
}

/* ============================================
   6. 行内加载（用于表格、列表等）
   ============================================ */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.loading-inline .rotating {
    width: 16px;
    height: 16px;
}

/* ============================================
   7. 空状态（无数据时）
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f3f4f6;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.empty-state-icon svg,
.empty-state-icon i {
    width: 40px;
    height: 40px;
}

/* 兼容 order.html 的类名 */
.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f3f4f6;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.empty-icon svg,
.empty-icon i {
    width: 40px;
    height: 40px;
}

.empty-state-text,
.empty-text {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 14px;
    color: #9ca3af;
}
