/**
 * WSCM 收货地址管理系统 - 前端样式
 * @since 3.4.0
 */

/* 订单状态容器 */
.wscm-orders-status {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* 订单卡片 */
.wscm-order-card {
    margin: 15px 0;
    padding: 15px;
    background: var(--main-bg-color, #fff);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.wscm-order-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 订单头部 */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.order-header strong {
    color: #333;
    font-size: 16px;
    margin-right: 10px;
}

.order-header span {
    color: #666;
    font-size: 14px;
}

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

/* 订单号 */
.order-number {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

/* 状态样式 */
.status-need-address {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #fff5f5;
    border-radius: 6px;
    border: 1px solid #ffdddd;
}

.status-need-address .status-text {
    color: #ff6b6b;
    font-weight: 500;
}

.status-pending {
    padding: 10px;
    background: #fff8e1;
    border-radius: 6px;
    border: 1px solid #ffe0b2;
    color: #ffa000;
}

.status-shipped {
    padding: 10px;
    background: #e8f5e9;
    border-radius: 6px;
    border: 1px solid #c8e6c9;
}

.status-shipped .status-text {
    color: #4caf50;
    margin-bottom: 8px;
    font-weight: 500;
}

.tracking-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.tracking-info span {
    font-size: 14px;
    color: #666;
}

.status-delivered {
    padding: 10px;
    background: #e0f7fa;
    border-radius: 6px;
    border: 1px solid #b2ebf2;
    color: #00acc1;
}

.status-desc {
    margin-left: 10px;
    font-size: 12px;
    color: #999;
}

/* 按钮样式 */
.wscm-fill-address,
.wscm-track-logistics {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wscm-fill-address {
    background: #ff6b6b;
    color: #fff;
}

.wscm-fill-address:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.wscm-track-logistics {
    background: #4caf50;
    color: #fff;
}

.wscm-track-logistics:hover {
    background: #45a049;
    transform: scale(1.05);
}

/* 地址表单弹窗头部 */
.wscm-order-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    margin: -15px -15px 20px -15px;
    border-radius: 8px 8px 0 0;
}

.wscm-order-info .info-title {
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.wscm-order-info .info-title i {
    margin-right: 8px;
}

.wscm-order-info .info-details {
    opacity: 0.95;
    font-size: 14px;
    line-height: 1.6;
}

.wscm-order-info .info-warning {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wscm-orders-status {
        padding: 15px;
        margin: 20px -15px;
    }
    
    .wscm-order-card {
        margin: 10px 0;
        padding: 12px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .order-time {
        margin-top: 5px;
    }
    
    .status-need-address,
    .tracking-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wscm-fill-address,
    .wscm-track-logistics {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
}

/* 加载动画 */
.wscm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: wscm-spin 1s ease-in-out infinite;
}

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

/* 提示消息 */
.wscm-message {
    position: fixed;
    top: 100px;
    right: 20px;
    max-width: 300px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: wscm-slide-in 0.3s ease;
}

.wscm-message.success {
    border-left: 4px solid #4caf50;
}

.wscm-message.error {
    border-left: 4px solid #ff6b6b;
}

.wscm-message.warning {
    border-left: 4px solid #ffa000;
}

@keyframes wscm-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}