:root {
    --mamma-red: #8b2f24;
    --mamma-red-bright: #b6422f;
    --mamma-ink: #25201f;
    --mamma-muted: #6f625e;
    --mamma-line: #ded6cf;
    --mamma-paper: #fffaf4;
    --mamma-gold: #c89a46;
    --mamma-green: #2f6f57;
}

body {
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--mamma-ink);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

.don-module {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--mamma-line);
    border-radius: 10px;
    box-sizing: border-box;
}

.don-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 22px;
    align-items: center;
    padding: 22px;
    background: linear-gradient(135deg, #fffaf4 0%, #ffffff 54%, #f4ebe1 100%);
    border-left: 5px solid var(--mamma-red);
    border-radius: 8px;
}

.don-kicker {
    margin: 0 0 8px;
    color: var(--mamma-red);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: 30px;
    line-height: 1.16;
}

h2 {
    margin-bottom: 14px;
    color: var(--mamma-red);
    font-size: 20px;
}

.don-intro {
    margin-bottom: 0;
    max-width: 680px;
    color: var(--mamma-muted);
    font-size: 16px;
    line-height: 1.55;
}

.don-vignette {
    width: 170px;
    height: 170px;
    justify-self: end;
    object-fit: contain;
    border-radius: 8px;
}

.don-form {
    margin-top: 20px;
}

.don-section,
.payment-panel {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--mamma-line);
    border-radius: 8px;
    background: #fff;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 12px;
}

.banknote {
    display: block;
    cursor: pointer;
}

.banknote > input[type="radio"],
.choice-card > input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.banknote-face {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 12px;
    border: 2px solid #c9b69c;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(47,111,87,.08), transparent 35%, rgba(200,154,70,.14)),
        var(--mamma-paper);
    color: var(--mamma-ink);
    text-align: center;
    box-sizing: border-box;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.banknote strong {
    font-size: 30px;
    line-height: 1;
}

.custom-banknote-face {
    gap: 10px;
}

.custom-amount-title {
    display: block;
    margin-bottom: 0;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.custom-amount-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0;
    font-weight: 700;
}

.custom-amount-input {
    max-width: 110px;
    min-height: 38px;
    margin: 0 auto;
    padding: 8px;
    text-align: center;
    font-weight: 700;
    background: #fff;
}

.custom-amount-input:focus {
    outline: 2px solid var(--mamma-red);
    outline-offset: 2px;
}

.banknote input:checked + .banknote-face {
    border-color: var(--mamma-red);
    box-shadow: 0 0 0 3px rgba(139, 47, 36, .16);
    transform: translateY(-1px);
}

.choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.choice-card {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 2px solid var(--mamma-line);
    border-radius: 8px;
    cursor: pointer;
}

.choice-card span {
    font-weight: 700;
}

.choice-card small {
    color: var(--mamma-muted);
    font-size: 13px;
    line-height: 1.35;
}

.choice-card:has(input:checked) {
    border-color: var(--mamma-red);
    background: #fff8f6;
}

.fund-options {
    margin-top: 14px;
}

.fund-options[hidden] {
    display: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-wide {
    grid-column: 1 / -1;
}

label span {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px;
    border: 1px solid #bfb5ad;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.payment-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background: #2b2523;
    color: #fff;
}

.payment-panel h2 {
    color: #fff;
}

.payment-panel p {
    margin-bottom: 0;
    color: #f0ded5;
    line-height: 1.45;
}

.payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.primary-btn,
.secondary-btn,
.return-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.primary-btn {
    background: var(--mamma-red);
    color: #fff;
}

.primary-btn:hover {
    background: var(--mamma-red-bright);
}

.secondary-btn {
    background: #fff;
    color: var(--mamma-red);
}

.return-btn {
    background: var(--mamma-red);
    color: #fff;
}

.message {
    padding: 14px;
    border-radius: 8px;
    line-height: 1.5;
}

.message.success {
    background: #e8f5e9;
    color: #1b5e20;
    border-left: 5px solid #2e7d32;
}

.message.error {
    background: #ffebee;
    color: #9f1616;
    border-left: 5px solid #c62828;
}

.message.info {
    background: #fff7e3;
    color: #6f4c00;
    border-left: 5px solid var(--mamma-gold);
}

@media (max-width: 760px) {
    .don-module {
        width: 100%;
        padding: 12px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .don-header,
    .payment-panel,
    .choice-row,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .don-header {
        padding: 16px;
    }

    .don-vignette {
        width: 160px;
        height: 160px;
        justify-self: start;
    }

    h1 {
        font-size: 25px;
    }

    .payment-actions {
        justify-content: stretch;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }
}
