/**
 * ReelQuick 支付组件样式
 * 提供统一的支付界面样式
 */

/* 支付按钮基础样式 */
.reelquick-payment-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reelquick-payment-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.reelquick-payment-btn:active {
    transform: translateY(0);
}

.reelquick-payment-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* 支付按钮变体 */
.reelquick-payment-btn.primary {
    background-color: #3b82f6;
}

.reelquick-payment-btn.secondary {
    background-color: #64748b;
}

.reelquick-payment-btn.danger {
    background-color: #ef4444;
}

.reelquick-payment-btn.success {
    background-color: #10b981;
}

.reelquick-payment-btn.large {
    padding: 16px 32px;
    font-size: 18px;
}

.reelquick-payment-btn.small {
    padding: 8px 16px;
    font-size: 14px;
}

/* 模态框基础样式 */
.reelquick-payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.reelquick-payment-modal.show {
    display: block;
}

.reelquick-payment-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.reelquick-payment-modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
}

/* 模态框头部 */
.reelquick-payment-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #334155;
}

.reelquick-payment-modal .modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #f8fafc;
}

.reelquick-payment-modal .modal-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.reelquick-payment-modal .modal-close-btn:hover {
    background: #334155;
    color: #f8fafc;
}

/* 模态框主体 */
.reelquick-payment-modal .modal-body {
    margin-bottom: 24px;
}

/* 商品信息 */
.reelquick-payment-modal .payment-item-info {
    background: #0f172a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #334155;
}

.reelquick-payment-modal .payment-item-info div {
    margin-bottom: 8px;
}

.reelquick-payment-modal .payment-item-info div:last-child {
    margin-bottom: 0;
}

.reelquick-payment-modal .payment-item-info strong {
    color: #94a3b8;
    margin-right: 8px;
}

/* 支付方式容器 */
.reelquick-payment-modal .payment-methods-container {
    margin-bottom: 16px;
}

.reelquick-payment-modal .payment-methods-loading {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
}

.reelquick-payment-modal .payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 确保支付方式列表在需要时显示 */
.reelquick-payment-modal .payment-methods-list.show {
    display: flex;
}

/* 支付方式选项 */
.reelquick-payment-modal .payment-method-option {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reelquick-payment-modal .payment-method-option:hover {
    border-color: #475569;
    background: #1e293b;
    transform: translateX(4px);
}

.reelquick-payment-modal .payment-method-option.selected {
    border-color: #3b82f6;
    background: #0c4a6e;
}

.reelquick-payment-modal .payment-method-option.selected::after {
    content: '✓';
    position: absolute;
    right: 16px;
    color: #3b82f6;
    font-size: 20px;
    font-weight: bold;
}

.reelquick-payment-modal .payment-method-option img {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    object-fit: contain;
}

/* 支付方式图标和文字颜色设置为白色 */
.reelquick-payment-modal .payment-method-option i {
    color: white; /* 设置图标为白色 */
    margin-right: 12px;
    font-size: 20px;
}

.reelquick-payment-modal .payment-method-option span {
    color: white; /* 设置文字为白色 */
    font-size: 16px;
}

/* 无支付方式提示 */
.reelquick-payment-modal .no-payment-methods {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    background: #0f172a;
    border-radius: 8px;
    border: 1px dashed #334155;
}

/* 模态框底部 */
.reelquick-payment-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #334155;
}

.reelquick-payment-modal .modal-cancel-btn {
    padding: 10px 20px;
    background: #475569;
    color: #f8fafc;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reelquick-payment-modal .modal-cancel-btn:hover {
    background: #64748b;
}

/* 加载覆盖层 */
.reelquick-payment-modal .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.reelquick-payment-modal .loading-overlay div {
    text-align: center;
}

.reelquick-payment-modal .loading-overlay div:first-child {
    font-size: 16px;
    margin-bottom: 16px;
    color: #f8fafc;
}

/* 旋转加载动画 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.reelquick-payment-modal .loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #334155;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Stripe支付表单样式 */
.reelquick-payment-modal .stripe-payment-form {
    background: #0f172a;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #334155;
}

.reelquick-payment-modal .stripe-payment-form h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

.reelquick-payment-modal .stripe-payment-form .form-group {
    margin-bottom: 20px;
}

.reelquick-payment-modal .stripe-payment-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

.reelquick-payment-modal .stripe-payment-form #card-element {
    padding: 12px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 16px;
}

.reelquick-payment-modal .stripe-payment-form #card-element:focus {
    outline: none;
    border-color: #3b82f6;
}

.reelquick-payment-modal .stripe-payment-form #card-errors {
    color: #ef4444;
    margin-top: 8px;
    font-size: 14px;
}

.reelquick-payment-modal .stripe-payment-form .stripe-pay-btn {
    width: 100%;
    padding: 14px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.reelquick-payment-modal .stripe-payment-form .stripe-pay-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.reelquick-payment-modal .stripe-payment-form .stripe-pay-btn:active {
    transform: translateY(0);
}

.reelquick-payment-modal .stripe-payment-form .stripe-pay-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .reelquick-payment-modal .modal-content {
        width: 95%;
        margin: 10px;
        padding: 24px;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    
    .reelquick-payment-btn {
        width: 100%;
        justify-content: center;
    }
    
    .reelquick-payment-modal .modal-footer {
        flex-direction: column;
    }
    
    .reelquick-payment-modal .modal-footer button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .reelquick-payment-modal .modal-content {
        padding: 20px;
        margin: 5px;
    }
    
    .reelquick-payment-modal .modal-title {
        font-size: 18px;
    }
    
    .reelquick-payment-modal .payment-method-option {
        padding: 12px;
    }
    
    .reelquick-payment-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 打印样式 */
@media print {
    .reelquick-payment-modal {
        display: none !important;
    }
}