/* Ecommpay Top Up Styles */

.ecommpay-topup-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ecommpay-balance-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.ecommpay-balance-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 500;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    height: 170px!important;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #fafbfc;
}

.form-section h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.form-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    color: #34495e;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:invalid {
    border-color: #e74c3c;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.col-md-6 {
    flex: 0 0 calc(50% - 7.5px);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #6c757d;
}

/* Быстрый выбор сумм */
.quick-amounts {
    margin-top: 20px;
}

.amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.amount-btn {
    padding: 10px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.amount-btn:hover,
.amount-btn.active {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* Стили для карт */
.card-number {
    position: relative;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.card-number.visa {
    background-image: url('../images/visa.png');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 30px;
}

.card-number.mastercard {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iOSIgY3k9IjEyIiByPSI2IiBmaWxsPSIjRUI1NTI0Ii8+CjxjaXJjbGUgY3g9IjE1IiBjeT0iMTIiIHI9IjYiIGZpbGw9IiNGNzlFMUIiLz4KPC9zdmc+');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 30px;
}

/* Резюме платежа */
.payment-summary {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
}

.payment-summary h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2c3e50;
}

.summary-amount {
    font-size: 28px;
    font-weight: 700;
    color: #27ae60;
}

/* Кнопки */
.form-actions {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Сообщения */
.payment-messages {
    margin: 20px 0;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Информация о безопасности */
.security-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.security-badges .badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.security-badges .icon {
    font-size: 16px;
}

.security-text {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* 3DS Modal */
.threeds-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .ecommpay-topup-form {
        margin: 10px;
        padding: 15px;
    }

    .form-section {
        height: 4000px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .col-md-6 {
        flex: 1;
    }
    
    .amount-buttons {
        justify-content: center;
    }
    
    .amount-btn {
        flex: 1;
        min-width: calc(33% - 7px);
        text-align: center;
    }
    
    .security-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .balance-amount {
        font-size: 24px;
    }
    
    .summary-amount {
        font-size: 24px;
    }
    
    .btn {
        width: 100%;
        min-width: unset;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .amount-btn {
        min-width: calc(50% - 5px);
    }
    
    .form-section {
		height:230px!important;
        padding: 15px;
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}