/* static/css/ls_payment.css - 律师函支付弹窗样式 */

.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.payment-modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.payment-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.payment-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.payment-content {
    padding: 20px;
}

.price-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.price {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    display: block;
    margin-bottom: 5px;
}

.price-desc {
    color: #666;
    font-size: 14px;
}

.service-features {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.feature {
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature:last-child {
    margin-bottom: 0;
}

.qr-code-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.qr-code-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.qr-code-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.qr-code-img {
    width: 200px;
    height: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-tips {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.qr-amount {
    font-weight: bold;
    color: #e74c3c;
    font-size: 16px;
    margin-bottom: 5px;
}

.order-info {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    font-family: monospace;
}

.payment-status {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6c757d;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.status-success {
    color: #27ae60;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: successPulse 0.5s ease-out;
}

.success-icon {
    font-size: 24px;
}

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

@keyframes successPulse {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.payment-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 100px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    opacity: 0.5;
}

.payment-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.payment-notice {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.support-info {
    margin: 0;
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .payment-modal {
        width: 95%;
        margin: 10px;
    }

    .payment-header {
        padding: 15px;
    }

    .payment-content {
        padding: 15px;
    }

    .price {
        font-size: 24px;
    }

    .qr-code-img {
        width: 180px;
        height: 180px;
    }

    .payment-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn {
        width: 100%;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .payment-modal {
        background: #2c3e50;
        color: #ecf0f1;
    }

    .payment-header {
        border-bottom-color: #34495e;
    }

    .payment-content {
        background: #2c3e50;
    }

    .price-info {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    }

    .service-features {
        background: #34495e;
        border-left-color: #3498db;
    }

    .feature {
        color: #bdc3c7;
    }

    .qr-code-section {
        background: #34495e;
        border-color: #4a5f7a;
    }

    .payment-status {
        background: #34495e;
    }

    .payment-footer {
        background: #34495e;
        border-top-color: #4a5f7a;
    }

    .qr-code-img {
        border-color: #4a5f7a;
    }
}

/* 动画和过渡效果 */
.payment-modal-overlay {
    animation: overlayFadeIn 0.3s ease-out;
}

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

.btn {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 焦点样式 */
.btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.modal-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}