/* donation.css */

:root {
    --primary: #087b4b;
    --primary-dark: #05613b;
    --heading: #10234d;
    --text: #526183;
    --border: #d6deea;
    --background: #f5f5eb;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--heading);
    background:
        radial-gradient(ellipse at 100% 0%, #b6d9bd 0, transparent 25%),
        radial-gradient(ellipse at 0% 100%, #dce9ce 0, transparent 30%),
        var(--background);
    line-height: 1.5;
}

.donation-page {
    min-height: 100vh;
    padding: 32px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donation-layout {
    width: 100%;
    max-width: 1240px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 48px;
    padding: 38px;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 12px 45px rgba(22, 47, 42, 0.08);
}

/* Left side: trust information */

.trust-panel {
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
}

.trust-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 34px;
}

.trust-logo {
    width: 112px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
    border: 2px solid #cdcdcd;
    border-radius: 6px;
    padding: 7px;
}

.trust-name {
    margin: 0;
    font-size: clamp(18px, 1.8vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.trust-title h3 {
    margin: 8px 0 0;
    font-size: 23px;
}

.trust-accent {
    width: 76px;
    height: 4px;
    margin-bottom: 22px;
    background: var(--primary);
    border-radius: 5px;
}

.trust-headline {
    margin: 0 0 18px;
    font-size: clamp(32px, 3.2vw, 48px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.trust-headline span {
    color: var(--primary);
}

.trust-description {
    color: var(--text);
    font-size: 17px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.trust-description p {
    margin: 0 0 18px;
}

.trust-contact {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 2px solid #d9eee2;
}

.trust-contact h3 {
    margin: 0 0 18px;
    font-size: 23px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 21px;
}

.contact-item strong {
    display: block;
    font-size: 16px;
    overflow-wrap: anywhere;
    text-decoration: none;
    color: var(--text);
}

.contact-item a {
    text-decoration: none;
}

.contact-item small {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

/* Right side: donation form */

.donation-panel {
    min-width: 0;
}

.donation-form-card {
    padding: 28px;
    border: 1px solid #f0f2f5;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 8px 30px rgba(30, 45, 70, 0.06);
}

.form-accent {
    width: 54px;
    height: 4px;
    margin-bottom: 14px;
    border-radius: 4px;
    background: var(--primary);
}

.form-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.form-subtitle {
    margin: 8px 0 24px;
    color: var(--text);
    font-size: 15px;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 18px;
    padding-top: 20px;
    border-top: 1px solid #edf0f4;
    font-size: 18px;
    font-weight: 700;
}

.section-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e0f3e8;
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-row-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.form-group {
    min-width: 0;
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
    color: var(--heading);
    font-size: 14px;
    font-weight: 600;
}

.required {
    color: #d93025;
}

.form-group input,
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--white);
    color: var(--heading);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input,
.form-group select {
    min-height: 48px;
}

.form-group textarea {
    min-height: 76px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8792ac;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 123, 75, 0.10);
}

.amount-field {
    position: relative;
}

.amount-field .currency-symbol {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text);
    font-size: 18px;
    pointer-events: none;
}

.amount-field input {
    padding-left: 40px;
}

.donate-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: var(--white);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.donate-button:hover {
    background: var(--primary-dark);
}

.donate-button:active {
    transform: translateY(1px);
}

.donate-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.error {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 7px;
    background: #fff0f0;
    color: #b42318;
    font-size: 14px;
}

.success {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 7px;
    background: #eaf8ef;
    color: #087a28;
    font-size: 14px;
}

/* Full-page payment verification overlay */
.payment-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(12, 25, 45, 0.58);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.payment-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.payment-loader-box {
    width: calc(100% - 40px);
    max-width: 360px;
    padding: 32px 24px;

    background: #ffffff;
    border-radius: 16px;
    text-align: center;

    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.payment-spinner {
    width: 54px;
    height: 54px;
    margin: 0 auto 20px;

    border: 5px solid #dcefe5;
    border-top-color: #087b4b;
    border-radius: 50%;

    animation: payment-spin 0.8s linear infinite;
}

@keyframes payment-spin {
    to {
        transform: rotate(360deg);
    }
}

.payment-loader-title {
    margin: 0 0 10px;
    color: #10234d;
    font-size: 20px;
    font-weight: 700;
}

.payment-loader-message {
    margin: 0;
    color: #526183;
    font-size: 14px;
    line-height: 1.6;
}

body.payment-processing {
    overflow: hidden;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .payment-spinner {
        animation-duration: 1.8s;
    }

    .payment-overlay {
        transition: none;
    }
}

/* Tablet and mobile */

@media (max-width: 900px) {
    .donation-page {
        padding: 20px 14px;
    }

    .donation-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 25px;
    }

    .trust-panel {
        padding: 0;
    }

    .trust-brand {
        margin-bottom: 24px;
    }

    .trust-headline {
        font-size: 36px;
    }

    .trust-description {
        font-size: 15px;
    }

    .trust-contact {
        margin-top: 12px;
    }

    .trust-contact a{color: var(--text) !important;}

    .donation-form-card {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .donation-page {
        padding: 10px;
    }

    .donation-layout {
        gap: 24px;
        padding: 18px 14px;
        border-radius: 12px;
    }

    .trust-brand {
        align-items: center;
        gap: 12px;
    }

    .trust-logo {
        width: 72px;
        height: 72px;
    }

    .trust-name {
        font-size: 23px;
    }

    .trust-subtitle {
        font-size: 12px;
    }

    .trust-headline {
        font-size: 31px;
    }

    .donation-form-card {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .form-title {
        font-size: 25px;
    }

    .form-row,
    .form-row-three {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .payment-security {
        justify-content: flex-start;
    }
}