/* MST Donations Frontend Styles - Modern Bootstrap-like Design */

/* Import Google Fonts for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
.mst-donation-form {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px; /* Increased from 600px */
    width: 90%; /* Added for better responsiveness */
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

/* Form Header - Updated to use site's green theme */
.mst-form-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%); /* Green gradient matching site */
    color: white;
    padding: 2rem;
    text-align: center;
}

.mst-form-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mst-form-header h3 i {
    color: #ff6b6b;
    font-size: 1.5rem;
}

.mst-form-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    font-weight: 300;
}

/* Form Container */
.mst-form {
    padding: 2rem;
}

/* Form Rows */
.mst-form-row {
    margin-bottom: 1.5rem;
}

.mst-form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mst-form-row label i {
    color: #28a745; /* Green color matching site */
    width: 16px;
}

/* Input Fields */
.mst-form-row input[type="text"],
.mst-form-row input[type="email"],
.mst-form-row input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.mst-form-row input:focus {
    outline: none;
    border-color: #28a745; /* Green focus color */
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1); /* Green shadow */
}

.mst-form-row input.mst-error {
    border-color: #ef4444;
}

.mst-field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Amount Options */
.mst-amount-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Increased from 140px for wider form */
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.mst-amount-option {
    position: relative;
    cursor: pointer;
}

.mst-amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.mst-amount-value {
    display: block;
    padding: 1rem;
    text-align: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    cursor: pointer;
}

.mst-amount-option input[type="radio"]:checked + .mst-amount-value {
    background: #28a745; /* Green background for selected */
    color: white;
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3); /* Green shadow */
}

.mst-amount-option:hover .mst-amount-value {
    border-color: #28a745; /* Green hover border */
    background: #f1f5f9;
}

.mst-amount-option input[type="radio"]:checked:hover + .mst-amount-value {
    background: #218838; /* Darker green on hover */
}

/* Custom Amount */
.mst-custom-amount .mst-amount-value {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.mst-custom-amount input[type="radio"]:checked + .mst-amount-value {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.mst-custom-amount-input {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    grid-column: 1 / -1; /* Span full width */
}

.mst-custom-amount-input input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.mst-custom-amount-input input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Payment Methods */
.mst-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Increased from 200px for wider form */
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.mst-payment-option {
    position: relative;
    cursor: pointer;
}

.mst-payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.mst-payment-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    cursor: pointer;
}

.mst-payment-option input[type="radio"]:checked + .mst-payment-label {
    background: #28a745; /* Green background for selected */
    color: white;
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3); /* Green shadow */
}

.mst-payment-option:hover .mst-payment-label {
    border-color: #28a745; /* Green hover border */
    background: #f1f5f9;
}

.mst-payment-option input[type="radio"]:checked:hover + .mst-payment-label {
    background: #218838; /* Darker green on hover */
}

.mst-payment-label i {
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

/* Submit Button - Updated to use site's green theme */
.mst-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%); /* Green gradient matching site */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mst-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3); /* Green shadow */
}

.mst-submit-btn:active {
    transform: translateY(0);
}

.mst-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.mst-btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mst-btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Messages */
.mst-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.mst-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.mst-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mst-donation-form {
        margin: 1rem;
        border-radius: 12px;
        width: 95%; /* Increased width on mobile */
    }
    
    .mst-form-header {
        padding: 1.5rem;
    }
    
    .mst-form-header h3 {
        font-size: 1.5rem;
    }
    
    .mst-form {
        padding: 1.5rem;
    }
    
    .mst-amount-options {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Adjusted for mobile */
        gap: 0.5rem;
    }
    
    .mst-payment-methods {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .mst-amount-value,
    .mst-payment-label {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .mst-donation-form {
        margin: 0.5rem;
        border-radius: 8px;
        width: 98%; /* Full width on small mobile */
    }
    
    .mst-form-header {
        padding: 1rem;
    }
    
    .mst-form {
        padding: 1rem;
    }
    
    .mst-amount-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mst-amount-value,
    .mst-payment-label {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* Loading States */
.mst-submit-btn.loading {
    pointer-events: none;
}

/* Focus States for Accessibility */
.mst-amount-option:focus-within .mst-amount-value,
.mst-payment-option:focus-within .mst-payment-label {
    outline: 2px solid #28a745; /* Green outline */
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .mst-donation-form {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .mst-submit-btn {
        display: none;
    }
} 

/* Simple Fallback Icons - Show when FontAwesome fails */
.mst-form-header h3:before {
    content: "♥";
    color: #ff6b6b;
    font-size: 1.5rem;
    margin-right: 0.5rem;
    display: inline-block;
}

/* Hide fallback when FontAwesome icons are present */
.mst-form-header h3 i {
    display: inline-block;
}

.mst-form-header h3 i + :before {
    display: none;
}

/* Remove all other fallback icons to prevent duplicates */
.mst-form-row label:before,
.mst-custom-amount .mst-amount-value:before,
.mst-submit-btn .mst-btn-text:before {
    display: none !important;
}

/* Bank Transfer Details */
.mst-bank-details {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.mst-bank-details h4 {
    color: #0c4a6e;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mst-bank-details h4 i {
    color: #0ea5e9;
}

.mst-bank-info {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0f2fe;
}

.mst-bank-info p {
    margin: 0.5rem 0;
    color: #374151;
    font-size: 0.95rem;
}

.mst-bank-info strong {
    color: #0c4a6e;
    font-weight: 600;
} 