/* ============================================
   代金券页面样式
   ============================================ */

/* CSS变量定义（补充） */
:root {
    --bg-light: #F8F9FA;
    --primary-color: #E60012;
    --border-color: #E5E5EA;
}

/* 代金券卡片 */
.coupon-card {
    background: linear-gradient(135deg, #E53935 0%, #FF6F61 100%);
    color: #fff;
    padding: 16px;
    margin-bottom: 12px;
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.coupon-icon {
    font-size: 28px;
}

.coupon-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.coupon-desc {
    font-size: 12px;
    opacity: 0.9;
}

.coupon-balance {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    margin: 10px 0;
}

.balance-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.balance-value {
    font-size: 22px;
    font-weight: 700;
}

.coupon-tips {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.coupon-tips p {
    margin-bottom: 4px;
}

.coupon-tips p:last-child {
    margin-bottom: 0;
}

/* 隐藏工具类 */
.hidden {
    display: none !important;
}

/* 代金券列表 */
.coupon-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.coupon-item.used {
    opacity: 0.5;
}

.coupon-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 16px;
    min-width: 80px;
}

.coupon-info {
    flex: 1;
}

.coupon-code {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.coupon-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.coupon-status.active {
    background: #d4edda;
    color: #155724;
}

.coupon-status.used {
    background: #e2e3e5;
    color: #383d41;
}

.coupon-status.expired {
    background: #f8d7da;
    color: #721c24;
}

.coupon-time {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.coupon-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.coupon-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* 错误提示 */
.error-msg {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8d7da;
    border-radius: var(--radius-sm);
}

/* 使用说明 */
.guide-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-num {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.guide-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 480px) {
    .coupon-balance {
        padding: 14px;
    }
    
    .balance-value {
        font-size: 24px;
    }
}

/* 手机号验证区域 */
.phone-section {
    margin-top: 12px;
}

.phone-section .form-group {
    margin-bottom: 10px;
}

.phone-section .form-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    display: block;
}

.phone-section .form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.phone-section .form-input:focus {
    outline: none;
    border-color: #E53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.phone-section .btn {
    margin-top: 6px;
    padding: 14px;
    font-size: 15px;
}

/* 居中按钮 */
.btn-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-center.btn {
    width: 100%;
    max-width: 300px;
    margin: 12px auto 0;
}
