/* Modern Donation Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 2% auto;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8e44ad, #6c3483, #27ae60);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

.modal-header {
    padding: 2.5rem 2.5rem 1.5rem;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #95a5a6;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(149, 165, 166, 0.1);
    z-index: 1;
}

.close:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    transform: rotate(90deg);
}

.modal-body {
    padding: 0 2.5rem 2.5rem;
}

/* Modern Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e8eeff;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8e44ad;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(142, 68, 173, 0.15);
    transform: translateY(-2px);
}

.form-group input[readonly] {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #6c757d;
    border-color: #dee2e6;
    font-weight: 600;
    cursor: not-allowed;
}

.form-group input[readonly]:focus {
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Floating Label Effect */
.form-group {
    position: relative;
}

.form-group input:focus + .floating-label,
.form-group input:not(:placeholder-shown) + .floating-label,
.form-group textarea:focus + .floating-label,
.form-group textarea:not(:placeholder-shown) + .floating-label {
    top: -8px;
    left: 12px;
    font-size: 0.75rem;
    color: #8e44ad;
    background: white;
    padding: 0 8px;
}

/* Form Actions */
.form-actions {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8eeff;
    text-align: center;
}

.submit-donation {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.3);
}

.submit-donation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-donation:hover::before {
    left: 100%;
}

.submit-donation:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(142, 68, 173, 0.4);
}

.submit-donation:active {
    transform: translateY(-1px);
}

.submit-donation:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading States */
.btn-loading {
    display: none;
}

.submit-donation.loading .btn-text {
    display: none;
}

.submit-donation.loading .btn-loading {
    display: inline;
}

.submit-donation.success {
    background: linear-gradient(135deg, #27ae60, #219653);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: none;
    }
    
    .modal-body {
        padding: 0 1.5rem 1.5rem;
    }
    
    .modal-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .close {
        right: 1rem;
        top: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 0 1rem 1rem;
    }
    
    .modal-header {
        padding: 1.5rem 1rem 0.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.9rem 1rem;
    }
    
    .submit-donation {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #8e44ad;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #6c3483;
}

/* Input Icons (Optional) */
.form-group {
    position: relative;
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    transition: color 0.3s ease;
}

.form-group input {
    padding-left: 3rem;
}

.form-group:focus-within i {
    color: #8e44ad;
}

/* Success Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
        transform: scale(1);
    }
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.success-checkmark path {
    stroke: #27ae60;
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.6s ease-in-out forwards;
}