/* =========================================
   orders.css - 我的订单页面样式
   使用 order-list- 前缀避免样式冲突
   ========================================= */

/* 筛选下拉框 */
.order-list-filter {
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.order-list-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: auto;
    -webkit-appearance: auto;
}
.order-list-select:focus {
    border-color: #1E9FFF;
    box-shadow: 0 0 0 2px rgba(30,159,255,0.1);
}
.order-list-form {
    margin: 0;
}

/* ===== 订单卡片 ===== */
.order-list-card {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 订单头部 */
.order-list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.order-list-card-sn {
    font-size: 12px;
    color: #999;
    font-family: monospace;
}

/* 状态标签 */
.order-list-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 各种订单状态颜色 */
.order-list-unpaid .order-list-status {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}
.order-list-processing .order-list-status,
.order-list-manual .order-list-status {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}
.order-list-success .order-list-status {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}
.order-list-failed .order-list-status {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}
.order-list-closed .order-list-status {
    background: #f5f5f5;
    color: #999;
    border: 1px solid #d9d9d9;
}
.order-list-refund .order-list-status {
    background: #fff0f6;
    color: #eb2f96;
    border: 1px solid #ffadd2;
}

/* ===== 订单主体 ===== */
.order-list-body {
    padding: 14px 16px;
}
.order-list-product {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.order-list-product-img {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}
.order-list-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.order-list-product-detail {
    flex: 1;
    min-width: 0;
}
.order-list-product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-list-product-price {
    font-size: 16px;
    color: #ff4d4f;
    font-weight: 600;
    margin-top: 6px;
}
.order-list-create-time {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* ===== 兑换凭证区域 ===== */
.order-list-credential {
    margin-top: 14px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    position: relative;
}
.order-list-credential-title {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #f8f9fa;
    padding: 0 6px;
    font-size: 11px;
    color: #888;
    font-weight: 500;
}
.order-list-credential-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}
.order-list-credential-row + .order-list-credential-row {
    border-top: 1px dashed #e8e8e8;
    margin-top: 4px;
    padding-top: 8px;
}
.order-list-credential-label {
    color: #666;
    flex-shrink: 0;
    margin-right: 12px;
}
.order-list-credential-value {
    color: #333;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e8e8e8;
    user-select: all;
}

/* 复制按钮 */
.order-list-copy-btn {
    padding: 2px 8px;
    font-size: 11px;
    color: #1E9FFF;
    border: 1px solid #1E9FFF;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.2s ease;
    outline: none;
    white-space: nowrap;
}
.order-list-copy-btn:hover {
    background: #1E9FFF;
    color: #fff;
}

/* ===== 底部操作按钮 ===== */
.order-list-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
.order-list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.order-list-btn:hover {
    opacity: 0.85;
}
.order-list-btn-primary {
    background: #1E9FFF;
    color: #fff;
}
.order-list-btn-primary:hover {
    background: #40a9ff;
    color: #fff;
}
.order-list-btn-default {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}
.order-list-btn-default:hover {
    color: #1E9FFF;
    border-color: #1E9FFF;
}
.order-list-btn-danger {
    background: #fff;
    color: #ff4d4f;
    border: 1px solid #ff4d4f;
}
.order-list-btn-danger:hover {
    background: #ff4d4f;
    color: #fff;
}

/* ===== 空状态 ===== */
.order-list-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.order-list-empty-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
    display: block;
}
.order-list-empty-text {
    font-size: 14px;
    margin: 0;
    color: #bbb;
}

/* ===== 加载更多 ===== */
.order-list-more {
    text-align: center;
    padding: 20px 0;
}
.order-list-more-btn {
    display: inline-flex;
    padding: 8px 32px;
    font-size: 14px;
    border-radius: 24px;
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
    text-decoration: none;
    cursor: pointer;
}
.order-list-more-btn:hover {
    background: #1E9FFF;
    color: #fff;
    border-color: #1E9FFF;
}

/* ===== 加载状态 ===== */
.order-list-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
}
.order-list-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e8e8e8;
    border-top-color: #1E9FFF;
    border-radius: 50%;
    animation: order-list-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes order-list-spin {
    to { transform: rotate(360deg); }
}