/* query.css - 订单查询页专属样式 */
/* 设计语言：沿用 buy.css 的 CSS 变量，保持视觉一致性 */

/* 页面标题区增强 */
.page-h {
    position: relative;
    margin-bottom: 24px;
    text-align: center;
}

.hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(22, 119, 255, 0.1), rgba(138, 92, 255, 0.1));
    border-radius: 50%;
    margin-bottom: 12px;
}

.hero-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
    fill: none;
}

/* 查询表单增强 */
.query-form {
    margin-bottom: 24px;
}

.field-icon {
    position: relative;
}

.field-icon .input-wrap {
    position: relative;
}

.field-icon input {
    padding-left: 48px;
}

.field-icon .input-wrap .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: var(--muted);
    fill: none;
    pointer-events: none;
}

/* 提交按钮增强 */
.btn-pay {
    background: linear-gradient(135deg, #1677ff, #4096ff);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-pay:hover {
    background: linear-gradient(135deg, #1677ff, #0958d9);
    box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4);
}

.btn-pay .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
}

/* 订单卡状态样式 */
.order-item {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    overflow: hidden;
}

.order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.15);
}

.order-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
}

.order-item.is-paid::before {
    background: #10b981;
}

.order-item.is-pending::before {
    background: #f59e0b;
}

.order-item.is-closed::before {
    background: #cbd5e1;
}

.order-item .order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-right: 16px;
}

.order-item .order-no {
    font-size: 12px;
    color: var(--muted);
}

.order-item .badge {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.order-item .order-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-item .order-name {
    font-weight: 600;
    font-size: 15px;
}

.order-item .order-amount {
    color: #f43f5e;
    font-weight: 700;
    font-size: 16px;
}

/* 兑换码区增强 */
.order-code {
    margin-top: 12px;
    padding: 14px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px dashed #10b981;
    border-radius: 10px;
    position: relative;
}

.order-code .code-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-code .code-key {
    font-size: 12px;
    color: #047857;
    font-weight: 600;
}

.order-code .code-text {
    font-family: "SF Mono", Menlo, monospace;
    font-size: 16px;
    font-weight: 700;
    color: #065f46;
    word-break: break-all;
    flex: 1;
    padding-right: 12px;
}

.order-code .btn-copy-code {
    padding: 6px 16px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.order-code .btn-copy-code:hover {
    background: #059669;
}

.order-code .btn-copy-code.copied {
    background: #059669;
    pointer-events: none;
}

/* 空状态增强 */
.state {
    text-align: center;
    padding: 32px 0;
}

.state-emoji {
    font-size: 42px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(22, 119, 255, 0.1), rgba(138, 92, 255, 0.1));
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text);
}

.state p {
    font-size: 14px;
    color: var(--muted);
}

/* 徽标增强 */
.badge {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .buy-card.wide {
        padding: 24px 20px;
    }
    
    .order-item {
        padding: 12px 14px;
    }
    
    .order-item .order-name {
        font-size: 14px;
    }
    
    .order-item .order-amount {
        font-size: 15px;
    }
    
    .order-code {
        padding: 12px;
    }
    
    .order-code .code-text {
        font-size: 14px;
    }
    
    .order-code .btn-copy-code {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* 加载状态 */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}