/* lawsuit_generator/frontend/static/css/payment-modal.css */
/**
 * 支付弹窗样式
 * 功能：二维码展示、订单信息、支付状态
 */

/* ============ 模态框容器 ============ */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 遮罩层 */
.payment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* 内容区域 */
.payment-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

/* 关闭按钮 */
.payment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.payment-modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.payment-modal-close svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

/* ============ 标题区域 ============ */
.payment-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.payment-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.payment-modal-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ============ 二维码区域 ============ */
.payment-qrcode-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
    background: #f9fafb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.payment-qrcode img {
    border-radius: 8px;
}

/* 加载动画 */
.payment-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.payment-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.payment-loading p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ============ 订单信息 ============ */
.payment-order-info {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.payment-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.payment-info-row:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.payment-info-label {
    font-size: 14px;
    color: #6b7280;
}

.payment-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

/* 总计行 */
.payment-info-total {
    padding-top: 12px;
    border-top: 2px solid #d1d5db !important;
}

.payment-info-total .payment-info-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.payment-total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* ============ 状态提示 ============ */
.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.payment-status-icon {
    width: 20px;
    height: 20px;
    color: #3b82f6;
}

.payment-status span {
    font-size: 14px;
    font-weight: 500;
    color: #1e40af;
}

/* 成功状态 */
.payment-status-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.payment-status-success .payment-status-icon {
    color: #16a34a;
}

.payment-status-success span {
    color: #166534;
}

/* 错误状态 */
.payment-status-error {
    background: #fef2f2;
    border-color: #fecaca;
}

.payment-status-error .payment-status-icon {
    color: #dc2626;
}

.payment-status-error span {
    color: #991b1b;
}

/* ============ 倒计时 ============ */
.payment-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.payment-countdown svg {
    width: 16px;
    height: 16px;
    color: #f59e0b;
}

.payment-countdown span {
    font-size: 14px;
    font-weight: 600;
    color: #d97706;
}

/* ============ 提示信息 ============ */
.payment-tips {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
}

.payment-tips p {
    font-size: 13px;
    color: #92400e;
    margin: 6px 0;
    line-height: 1.5;
}

.payment-tips strong {
    color: #78350f;
}

/* ============ 响应式设计 ============ */
@media (max-width: 768px) {
    .payment-modal-content {
        padding: 24px;
        width: 95%;
        max-width: none;
    }

    .payment-modal-header h2 {
        font-size: 20px;
    }

    .payment-qrcode-container {
        width: 180px;
        height: 180px;
    }

    .payment-total-amount {
        font-size: 20px;
    }

    .payment-tips {
        padding: 10px 12px;
    }

    .payment-tips p {
        font-size: 12px;
    }
}