/* Donation System Styles - Universal Design */

/* Floating Action Button */
.donation-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    padding: 12px 16px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    animation: fadeInUp 0.5s ease-out;
    animation-delay: 5s;
    animation-fill-mode: both;
}

.donation-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    padding-right: 20px;
}

.fab-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.fab-text {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease;
    font-weight: 500;
}

.donation-fab:hover .fab-text {
    max-width: 100px;
}

/* Subtle pulse animation */
@keyframes subtlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.donation-fab {
    animation: fadeInUp 0.5s ease-out 5s both,
               subtlePulse 2s ease-in-out 35s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styles */
.donation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.donation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6B7280;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #F3F4F6;
    color: #1F2937;
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1F2937;
}

.modal-header p {
    margin: 0;
    color: #6B7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Amount Grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 10px 8px;
    border: 2px solid #E5E7EB;
    background: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.3;
}

.amount-btn small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: #9CA3AF;
    margin-top: 2px;
}

.amount-btn:hover {
    border-color: #6366F1;
    color: #6366F1;
    background: #F0F0FF;
}

.amount-btn.active {
    border-color: #6366F1;
    background: #6366F1;
    color: white;
}

/* Custom Amount */
.custom-amount {
    margin-bottom: 24px;
}

.custom-amount label {
    display: block;
    margin-bottom: 8px;
    color: #4B5563;
    font-size: 14px;
    font-weight: 500;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: #6366F1;
}

.currency {
    color: #6B7280;
    font-size: 16px;
    font-weight: 500;
}

#custom-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 8px;
    font-size: 16px;
    font-weight: 500;
    color: #1F2937;
}

#custom-input::placeholder {
    color: #D1D5DB;
}

/* Hide number input spinners */
#custom-input::-webkit-outer-spin-button,
#custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Donate Button */
.donate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.donate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.donate-btn:active {
    transform: translateY(0);
}

.donate-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.donate-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Trust Indicator */
.trust-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    color: #6B7280;
    font-size: 13px;
}

.trust-indicator svg {
    width: 14px;
    height: 14px;
}

/* Success Modal */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.success-modal.active {
    display: flex;
}

.success-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    animation: successBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successBounce {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
}

.success-content h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1F2937;
}

.success-content p {
    margin: 0;
    color: #6B7280;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .modal-content {
        padding: 24px;
        width: 95%;
    }
    
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .donation-fab {
        bottom: 16px;
        left: 16px;
    }
}