/* 订单页面样式 */

/* 订单状态筛选 */
.order-tabs {
    display: flex;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 44px;
    z-index: 100;
}

.order-tabs .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.order-tabs .tab-item.active {
    color: #f37021;
}

.order-tabs .tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: #f37021;
}

.tab-text {
    font-size: 14px;
    margin-bottom: 2px;
}

.tab-badge {
    background-color: #f37021;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 空订单状态 */
.empty-order {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

/* 订单列表 */
.order-list {
    padding: 8px 0;
}

.order-item {
    background-color: #fff;
    border-radius: 0;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: none;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 订单头部 */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #f9f9f9;
}

.order-info {
    flex: 1;
}

.order-number {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.order-time {
    font-size: 12px;
    color: #999;
}

.order-status {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
}

.status-1 {
    color: #f37021;
    background-color: #fff4ec;
}

.status-2 {
    color: #ffa726;
    background-color: #fff8e1;
}

.status-3 {
    color: #42a5f5;
    background-color: #e3f2fd;
}

.status-4 {
    color: #66bb6a;
    background-color: #e8f5e8;
}

.status-5 {
    color: #9e9e9e;
    background-color: #f5f5f5;
}

/* 订单商品 */
.order-goods {
    padding: 5px 15px;
}

.goods-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.goods-item:last-child {
    border-bottom: none;
}

.goods-image {
    width: 60px;
    height: 60px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    flex-shrink: 0;
}

.goods-info {
    padding: 0px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.goods-name {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-specs {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.goods-price {
    position: relative;
    font-size: 14px;
    color: #f37021;
    font-weight: 500;
}

.goods-quantity {
    display: inline-block !important;
    position: absolute;
    right: 0;
    font-size: 12px;
    color: #999;
    align-self: flex-end;
}

/* 订单统计 */
.order-summary {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #f0f0f0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item.total {
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 8px;
}

.summary-label {
    font-size: 14px;
    color: #666;
}

.summary-value {
    font-size: 14px;
    color: #333;
}

.summary-item.total .summary-value {
    color: #f37021;
    font-weight: 600;
    font-size: 16px;
}

/* 订单操作 */
.order-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
}

.order-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 15px;
    min-width: 80px;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 20px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more:hover {
    background-color: #f5f5f5;
}

.load-more-text {
    font-size: 14px;
}

.load-more.loading .load-more-text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f37021;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 取消订单弹窗 */
.cancel-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 12px;
    width: 300px;
    max-width: 90vw;
    overflow: hidden;
    animation: modalShow 0.3s ease;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-header {
    padding: 20px 20px 0;
    text-align: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.cancel-reason label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

.cancel-reason select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
}

.cancel-reason select:focus {
    outline: none;
    border-color: #f37021;
}

.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
}

.modal-footer .btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border-radius: 20px;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .order-tabs {
        top: 40px;
    }
    
    .order-tabs .tab-item {
        padding: 10px 6px;
    }
    
    .tab-text {
        font-size: 13px;
    }
    
    .order-header {
        padding: 12px;
    }
    
    .order-number {
        font-size: 13px;
    }
    
    .order-time {
        font-size: 11px;
    }
    
    .order-status {
        font-size: 13px;
        padding: 3px 6px;
    }
    
    .order-goods {
        padding: 12px;
    }
    
    .goods-item {
        padding: 8px 0;
    }
    
    .goods-image {
        width: 50px;
        height: 50px;
    }
    
    .goods-name {
        font-size: 13px;
    }
    
    .goods-price {
        font-size: 13px;
    }
    
    .order-summary {
        padding: 12px;
    }
    
    .summary-label,
    .summary-value {
        font-size: 13px;
    }
    
    .order-actions {
        padding: 12px;
    }
    
    .order-actions .btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 70px;
    }
}

@media (max-width: 320px) {
    .order-tabs {
        top: 36px;
    }
    
    .order-tabs .tab-item {
        padding: 8px 4px;
    }
    
    .tab-text {
        font-size: 12px;
    }
    
    .order-header {
        padding: 10px;
    }
    
    .order-number {
        font-size: 12px;
    }
    
    .order-time {
        font-size: 10px;
    }
    
    .order-status {
        font-size: 12px;
        padding: 2px 4px;
    }
    
    .order-goods {
        padding: 10px;
    }
    .goods-item {
        padding: 6px 0;
    }
    
    .goods-image {
        width: 45px;
        height: 45px;
    }
    
    .goods-name {
        font-size: 12px;
    }
    
    .goods-price {
        font-size: 12px;
    }
    
    .order-summary {
        padding: 10px;
    }
    
    .summary-label,
    .summary-value {
        font-size: 12px;
    }
    
    .order-actions {
        padding: 10px;
        flex-direction: column;
    }
    
    .order-actions .btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: auto;
    }
}

/* 触摸反馈 */
.order-tabs .tab-item:active {
    background-color: #e0e0e0;
}

.order-item:active {
    transform: scale(0.98);
}

.load-more:active {
    background-color: #e0e0e0;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-10 {
    margin-top: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

.p-10 {
    padding: 10px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
} 