/**
 * Donation Form V2 - Enhanced UI/UX
 * Author: Wakaf UNP Team
 * Version: 2.0
 * Date: 2026-01-15
 */

/* Progress Indicator */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: -1;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.progress-step.active .progress-step-circle {
    background: #0088cc;
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .progress-step-circle {
    background: #28a745;
    color: white;
}

.progress-step.completed .progress-step-circle::after {
    content: '✓';
    font-size: 20px;
}

.progress-step-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.progress-step.active .progress-step-label {
    color: #0088cc;
    font-weight: 600;
}

/* Form Input Enhancements */
.form-group-enhanced {
    position: relative;
    margin-bottom: 25px;
}

.form-control-enhanced {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control-enhanced:focus {
    border-color: #0088cc;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
    outline: none;
}

.form-control-enhanced.is-valid {
    border-color: #28a745;
    padding-right: 40px;
}

.form-control-enhanced.is-invalid {
    border-color: #dc3545;
    padding-right: 40px;
}

/* Validation Icons */
.validation-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    pointer-events: none;
}

.validation-icon.valid {
    color: #28a745;
}

.validation-icon.invalid {
    color: #dc3545;
}

/* Helper Text */
.form-helper-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    display: block;
}

.form-helper-text.error {
    color: #dc3545;
    font-weight: 500;
}

.form-helper-text.success {
    color: #28a745;
}

/* Rupiah Formatter */
.nominal-display {
    font-size: 24px;
    font-weight: bold;
    color: #0088cc;
    margin-bottom: 15px;
    text-align: center;
}

/* Quick Amount Buttons */
.quick-amount-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .quick-amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-amount-btn {
    padding: 12px 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.quick-amount-btn:hover {
    border-color: #0088cc;
    background: #f0f8ff;
    transform: translateY(-2px);
}

.quick-amount-btn.active {
    border-color: #0088cc;
    background: #0088cc;
    color: white;
}

/* Bank Selection Cards */
.bank-card {
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 15px;
}

.bank-card:hover {
    border-color: #0088cc;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
    transform: translateY(-3px);
}

.bank-card.selected {
    border-color: #0088cc;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.bank-card img {
    max-width: 150px;
    height: auto;
    margin: 10px 0;
}

.bank-card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Payment Method Cards */
.payment-method-card {
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}

.payment-method-card:hover:not(.disabled) {
    border-color: #0088cc;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
    transform: translateY(-3px);
}

.payment-method-card.selected {
    border-color: #0088cc;
    background: #f0f8ff;
}

.payment-method-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.payment-method-card img {
    max-width: 120px;
    height: auto;
    margin: 15px 0;
}

.payment-method-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.payment-method-badge.max-limit {
    background: #fff3cd;
    color: #856404;
}

.payment-method-badge.badge-disabled {
    background: #f8d7da;
    color: #721c24;
}

/* Preview Summary */
.preview-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #666;
}

.preview-value {
    font-weight: 600;
    color: #333;
}

.preview-total {
    font-size: 24px;
    color: #0088cc;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-back {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-next {
    background: #0088cc;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-next:hover:not(:disabled) {
    background: #0077b3;
    transform: translateY(-2px);
}

.btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-submit {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-submit:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.trust-badge i {
    font-size: 20px;
    color: #28a745;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0088cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.loading-submessage {
    font-size: 14px;
    color: #666;
}

/* Alert Boxes */
.alert-box {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-box.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-box.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-box.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-box i {
    font-size: 24px;
}

/* Checkbox Large */
.checkbox-large {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-large input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-large label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .progress-steps {
        font-size: 12px;
    }
    
    .progress-step-circle {
        width: 35px;
        height: 35px;
    }
    
    .bank-card img {
        max-width: 100px;
    }
    
    .form-navigation {
        flex-direction: column-reverse;
    }
    
    .btn-back,
    .btn-next {
        width: 100%;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 10px;
    }
}

/* Hidden class */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-danger {
    color: #dc3545 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Margin utilities */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
