/* =============================================
   سیستم پرداخت - Payment System Styles
   ============================================= */

/* مودال انتخاب درگاه */
.payment-gateway-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.payment-gateway-modal.active {
    opacity: 1;
    visibility: visible;
}

.payment-gateway-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.payment-gateway-modal.active .payment-gateway-content {
    transform: translateY(0);
}

.payment-gateway-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 24px;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.payment-gateway-header i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

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

.gateway-amount {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.gateway-amount .amount-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.gateway-amount .amount-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.gateway-subtitle {
    text-align: center;
    padding: 16px;
    margin: 0;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

/* لیست درگاه‌ها */
.gateway-list {
    padding: 12px;
}

.gateway-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.gateway-option:last-child {
    margin-bottom: 0;
}

.gateway-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateX(-4px);
}

.gateway-option:active {
    transform: scale(0.98);
}

.gateway-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    margin-left: 16px;
    flex-shrink: 0;
}

.gateway-icon i {
    font-size: 24px;
    color: #3498db;
}

.gateway-icon .gateway-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.gateway-info {
    flex: 1;
}

.gateway-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.gateway-desc {
    font-size: 12px;
    color: #888;
}

.gateway-select-icon {
    color: #aaa;
    font-size: 16px;
    transition: transform 0.2s;
}

.gateway-option:hover .gateway-select-icon {
    transform: translateX(-4px);
    color: #3498db;
}

/* دکمه انصراف */
.gateway-cancel {
    padding: 16px;
    border-top: 1px solid #e9ecef;
}

.btn-cancel-payment {
    width: 100%;
    padding: 14px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-cancel-payment:hover {
    background: #e9ecef;
    color: #333;
}

.btn-cancel-payment i {
    margin-left: 8px;
}

/* مودال نتیجه پرداخت */
.payment-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.payment-result-modal.active {
    opacity: 1;
    visibility: visible;
}

.payment-result-content {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.payment-result-modal.active .payment-result-content {
    transform: scale(1);
}

.result-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.result-icon.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.4);
}

.result-icon.failure {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    box-shadow: 0 10px 30px rgba(192, 57, 43, 0.4);
}

.result-icon i {
    font-size: 45px;
    color: #fff;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #2c3e50;
}

.result-message {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
}

.error-code {
    font-size: 13px;
    color: #999;
    margin: -12px 0 24px;
    direction: ltr;
}

/* جزئیات پرداخت */
.result-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: right;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: #888;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.detail-value.ltr {
    direction: ltr;
    font-family: 'Courier New', monospace;
}

/* دکمه‌های نتیجه */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-actions .btn-primary,
.result-actions .btn-secondary {
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.result-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}

.result-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.result-actions .btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.result-actions .btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

.result-actions button i {
    margin-left: 8px;
}

/* لودینگ اورلی */
/*.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-message {
    font-size: 16px;
    color: #666;
    margin: 0;
}*/

/* ریسپانسیو */
@media (max-width: 480px) {
    .payment-gateway-content,
    .payment-result-content {
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        max-height: 85vh;
    }
    
    .payment-gateway-modal,
    .payment-result-modal {
        align-items: flex-end;
        padding: 0;
    }
    
    .gateway-amount .amount-value {
        font-size: 24px;
    }
    
    .result-icon {
        width: 70px;
        height: 70px;
    }
    
    .result-icon i {
        font-size: 35px;
    }
}
