/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* Modern Layout Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global button styling - rounded pill shape */
.btn,
button,
input[type="submit"],
input[type="button"] {
    border-radius: 50px !important;
}

html, body {
    font-family: 'Kanit', 'Sarabun', sans-serif !important;
    height: 100%;
    scroll-behavior: smooth;
    /* Page background: full viewport gradient */
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 25%, #3b82f6 50%, #60a5fa 75%, #93c5fd 100%);
    background-attachment: fixed;
    background-size: cover;
}

/* Ensure the page-level donation wrapper doesn't restrict the background */
.page-donation {
    background: transparent !important;
}

/* Make the animated background and particles cover the viewport even when
   they are rendered inside a centered container (.container) */
.animated-bg {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0;
    overflow: hidden;
}

.particles {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0;
    pointer-events: none;
}

/* Modern Navbar */
.navbar-modern {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
    color: #f97316 !important;
}

.navbar-brand i {
    font-size: 1.8rem;
    color: #f97316;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    margin: 0 0.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #f97316;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link:hover::before {
    width: 80%;
}

.btn-logout {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: none;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, #ea580c, #c2410c);
}

/* Main Content */
main {
    flex: 1;
    padding-top: 20px;
    min-height: auto;
}

.container {
    max-width: 1200px;
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #f97316;
}

/* Footer */
.footer-modern {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 2rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.footer-modern .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-modern a {
    color: #f97316;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer-modern a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-info i {
    color: #f97316;
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Loading Animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.8rem !important;
    }
    
    .footer-modern .container {
        flex-direction: column;
        text-align: center;
    }
    
    main {
        padding-top: 70px;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
    z-index: 5;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.scroll-to-top.show {
    display: flex;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Preference Cards Styling */
.preference-card {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.preference-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.preference-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.preference-header i {
    font-size: 1.2rem;
}

.preference-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preference-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
    font-weight: 400;
}

.preference-option:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f0f9ff, #ffffff);
    transform: translateX(3px);
}

.preference-radio {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.preference-radio:checked + .option-content .option-title {
    color: #3b82f6;
    font-weight: 600;
}

.preference-option:has(.preference-radio:checked) {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.option-title {
    color: #1f2937;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.option-desc {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Checkbox Option Styling */
.preference-checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
    font-weight: 400;
}

.preference-checkbox-option:hover {
    border-color: #f97316;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    transform: translateX(3px);
}

.preference-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #f97316;
    flex-shrink: 0;
}

.preference-checkbox:checked + .checkbox-content .checkbox-title {
    color: #f97316;
    font-weight: 600;
}

.preference-checkbox-option:has(.preference-checkbox:checked) {
    border-color: #f97316;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.checkbox-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.checkbox-title {
    color: #1f2937;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.checkbox-desc {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

.preference-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fee2e2;
    border-radius: 6px;
    border-left: 3px solid #dc2626;
}

/* Responsive for preferences */
@media (max-width: 768px) {
    .preference-card {
        padding: 15px;
    }
    
    .preference-option,
    .preference-checkbox-option {
        padding: 12px;
    }
    
    .preference-header {
        font-size: 1rem;
    }
}

/* ==================== SweetAlert2 Override Protection ==================== */
/* Protect form styles from being overridden by SweetAlert2 or other libraries */

/* Force form input styles to remain consistent */
.donate-card .form-control,
.donate-card input[type="text"],
.donate-card input[type="email"],
.donate-card input[type="number"],
.donate-card select.form-control {
    border-radius: 12px !important;
    padding: 8px 8px !important;
    font-size: 1.05rem !important;
    border: 2px solid #e2e8f0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.donate-card .form-control:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08) !important;
}

.donate-card .form-control:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    background: linear-gradient(to bottom, #ffffff, #f0f9ff) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Protect submit button styles */
.donate-card .btn-donate,
.donate-card button[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 18px 45px !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 12px 35px rgba(249, 115, 22, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
}

.donate-card .btn-donate:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.2) inset, 0 0 40px rgba(249, 115, 22, 0.3) !important;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
}

.donate-card .btn-donate:active {
    transform: translateY(0) scale(0.98) !important;
    transition: transform 0.1s !important;
}

.donate-card .btn-donate:disabled {
    opacity: 0.8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    pointer-events: none !important;
}

.donate-card .btn-donate.loading {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

/* Protect form group styles */
.donate-card .form-group {
    margin-bottom: 25px !important;
    position: relative !important;
}

.donate-card .form-group label {
    font-weight: 500 !important;
    color: #1f2937 !important;
    margin-bottom: 8px !important;
    display: block !important;
    font-size: 0.95rem !important;
    transition: color 0.3s ease !important;
}

.donate-card .form-group.focused label {
    color: #3b82f6 !important;
}

/* Tax fields wrapper - smooth transition */
#person-tax-field,
#company-tax-field {
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Tax Reduction and Receipt Preferences Styling */
.tax-reduction-options label input[type="radio"],
.form-group label input[type="checkbox"] {
    cursor: pointer;
    accent-color: #3b82f6;
    transition: all 0.2s ease;
}

.tax-reduction-options label input[type="radio"]:hover,
.form-group label input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.tax-reduction-options label input[type="radio"]:checked + span,
.form-group label input[type="checkbox"]:checked + span {
    color: #3b82f6;
    font-weight: 600;
}

/* Form check input styling */
.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-check-input:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* ==================== Additional Donation Form Styles ==================== */

/* Background Image for Donation Page */
.animated-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.05;
}

/* Page Donation Container */
.page-donation {
    min-height: auto;
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 20px 40px 20px;
    margin-top: 0;
}

/* Donate Container */
.donate-container {
    position: relative;
    max-width: 650px;
    width: 100%;
    z-index: 10;
    margin: 20px auto;
}

/* Glass Card Effect */
.donate-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    padding: 50px 45px;
    position: relative;
    overflow: hidden;
}

/* Header Section */
.donate-header {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
    position: relative;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.donate-logo {
    width: 150px;
    height: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-logo img {
    width: 100%;
    height: auto;
    max-width: 150px;
    border-radius: 15px;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
    transition: transform 0.3s ease;
}

.donate-logo:hover img {
    transform: scale(1.05);
}

.donate-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e40af 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.donate-header .subtitle {
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Section Titles */
.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e40af;
    margin: 35px 0 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.section-title::before {
    content: '';
    width: 35px;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #3b82f6);
    border-radius: 3px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), transparent);
}

/* Donor Type Selection */
.donor-type-row {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.donor-type-row label {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.donor-type-row input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.donor-type-row span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    color: #475569;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donor-type-row span::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #3b82f6, #f97316);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    z-index: -1;
}

.donor-type-row label:hover span {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.donor-type-row input[type="radio"]:checked+span {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-color: transparent;
    color: #ffffff;
    transform: scale(1.02);
    box-shadow:
        0 12px 30px rgba(59, 130, 246, 0.4),
        0 0 0 3px rgba(249, 115, 22, 0.2);
}

.donor-type-row input[type="radio"]:checked+span::before {
    width: 300%;
    height: 300%;
}

.donor-type-row span i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.donor-type-row input[type="radio"]:checked+span i {
    transform: rotate(360deg) scale(1.2);
    color: #f97316;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.form-group.focused label {
    color: #3b82f6;
}

/* Enhanced Input Fields */
.form-control {
    width: 100%;
    padding: 5px 10px;
    font-size: 1.05rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-control:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background: linear-gradient(to bottom, #ffffff, #f0f9ff);
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.15),
        0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

/* Amount Input Special */
.amount-input-wrapper {
    position: relative;
}

.amount-input-wrapper .currency-symbol {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #f97316;
    font-size: 1.3rem;
    font-weight: 700;
}

.amount-input-wrapper input {
    padding-left: 50px;
    font-weight: 600;
    color: #1e40af;
}

/* Submit Button */
.btn-donate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 45px;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 12px 35px rgba(249, 115, 22, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    cursor: pointer;
}

.btn-donate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-donate:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 18px 45px rgba(249, 115, 22, 0.5),
        0 0 0 2px rgba(255, 255, 255, 0.2) inset,
        0 0 40px rgba(249, 115, 22, 0.3);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.btn-donate:hover::before {
    width: 400px;
    height: 400px;
}

.btn-donate:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s;
}

.btn-donate i {
    font-size: 1.3rem;
}

.btn-donate.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-donate.loading i {
    animation: spinBtn 1s linear infinite;
}

@keyframes spinBtn {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 40px;
}

.form-note {
    margin-top: 20px;
    color: #475569;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-note i {
    color: #3b82f6;
    font-size: 1.1rem;
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: none;
}

.success-checkmark.show {
    display: block;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(-45deg);
    }
    100% {
        transform: scale(1) rotate(-45deg);
        opacity: 1;
    }
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #f97316;
    fill: none;
    animation: strokeAnim 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeAnim 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes strokeAnim {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Tooltip */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 50%;
    color: #475569;
    font-size: 0.8rem;
    cursor: help;
    margin-left: 5px;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

.tooltip-wrapper:hover .tooltip-content {
    opacity: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 64, 175, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #f97316;
    border-radius: 50%;
    animation: spinLoader 1s linear infinite;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Validation Styles */
.invalid-feedback {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 5px;
    animation: shake 0.3s;
}

.is-invalid {
    border-color: #ef4444 !important;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.amount-warning {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* QR Popup Customization */
.qr-popup-custom {
    border-radius: 20px !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3) !important;
}

.qr-popup-custom .swal2-confirm {
    font-size: 1.1rem !important;
    padding: 12px 30px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.qr-popup-custom .swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4) !important;
}

/* Close Button Customization */
.qr-close-button-custom {
    color: #6b7280 !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border-radius: 50% !important;
    background: transparent !important;
}

.qr-close-button-custom:hover {
    background: #f3f4f6 !important;
    color: #dc2626 !important;
    transform: rotate(90deg) !important;
}

.qr-close-button-custom:focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px !important;
}

/* Payment Status Message Animation */
.payment-status-message {
    animation: slideInDownMsg 0.3s ease-out !important;
}

@keyframes slideInDownMsg {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Donation Form */
@media (max-width: 576px) {
    .page-donation {
        padding-top: 8px;
        padding-bottom: 30px;
    }

    .donate-header {
        margin-top: 8px;
        margin-bottom: 20px;
    }

    .donate-card {
        padding: 28px 20px;
        border-radius: 18px;
        max-width: 420px;
        margin: 12px auto;
    }

    .donate-logo {
        width: 120px;
    }

    .donate-header h1 {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    .page-donation {
        padding-top: 12px;
    }

    .donate-header {
        margin-top: 12px;
    }
}

@media (max-width: 768px) {
    .donate-card {
        padding: 35px 25px;
        border-radius: 25px;
    }

    .donate-header h1 {
        font-size: 2.2rem;
    }

    .donor-type-row {
        flex-direction: column;
        gap: 12px;
    }

    .btn-donate {
        width: 100%;
        padding: 16px 35px;
    }

    .row {
        margin: 0;
    }

    .row>[class*="col-"] {
        padding: 0;
        margin-bottom: 15px;
    }
}
