/* DONATE BLOCK (functions/donate.php). Plain CSS next to Tailwind, so style.css does not need a rebuild. */
.donate-form { display: grid; gap: 18px; margin-top: 8px; }
.donate-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.donate-form legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.donate-trap { position: absolute; left: -9999px; }

.donate-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.donate-choice label { position: relative; cursor: pointer; }
.donate-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.donate-choice span { display: inline-block; border: 1px solid #131313; border-radius: 15px; padding: 6px 18px; font-size: 16px; line-height: 1.2; transition: .3s ease-in-out; }
.donate-choice label:hover span { background: rgba(19, 19, 19, .08); }
.donate-choice input:checked + span { background: #131313; color: #fff; }
.donate-choice input:focus-visible + span { outline: 2px solid #394DFB; outline-offset: 2px; }
.donate-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.donate-amounts span { display: block; text-align: center; white-space: nowrap; padding-inline: 10px; }
.donate-amounts[hidden] { display: none; }

.donate-fields { display: grid; gap: 14px; }
@media (min-width: 640px) { .donate-fields { grid-template-columns: 1fr 1fr; } }
.donate-field { margin: 0; }
.donate-field label { display: block; font-weight: 700; }
.donate-field :is(input, textarea) { display: block; width: 100%; margin-top: 6px; background: none; color: #131313; border: 1px solid #131313; border-radius: 15px; padding: 6px 12px; font: inherit; line-height: 1.2; }
.donate-field :is(input, textarea):focus { outline: 2px solid #394DFB; outline-offset: 1px; box-shadow: none; }
.donate-field textarea { resize: vertical; min-height: 4.5em; }
@media (min-width: 640px) { .donate-note { grid-column: 1 / -1; } }
.donate-optional { font-weight: 400; color: #8B8B8B; }
.donate-other[hidden] { display: none; }
/* A field with a problem, its message under it, and all of them under the button. */
.donate-form [aria-invalid="true"] { border-color: #A5243B !important; box-shadow: 0 0 0 1px #A5243B; background-color: #fdf2f3; }
.donate-field:has([aria-invalid="true"]) label { color: #A5243B; }
.donate-amounts.is-error span { border-color: #A5243B; }
.donate-error { display: block; margin-top: 6px; font-size: 14px; font-weight: 400; line-height: 1.4; color: #A5243B; }
.donate-error[hidden], .donate-errors[hidden] { display: none; }
.donate-errors { border-left: 3px solid #A5243B; background: #fdf2f3; color: #7d1a2c; border-radius: 0 12px 12px 0; padding: 12px 18px; font-size: 15px; }
.donate-errors p { margin: 0; font-weight: 700; }
.donate-errors ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.donate-errors a { color: inherit; text-decoration: underline; }
.donate-form .donate-submit:disabled { opacity: .6; cursor: progress; }
.donate-check { margin: 0; }
.donate-check label { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
.donate-check input { width: 18px; height: 18px; margin: 0; border: 1px solid #131313; border-radius: 4px; color: #131313; }
.donate-check input:focus-visible { outline: 2px solid #394DFB; outline-offset: 2px; }

/* Doneer and the buttons on the donor's own page: at least 44px high, what a fingertip needs. */
.donate-form .donate-submit, .donate-mine .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; font-size: 14px; padding: 0 26px; line-height: 1; }
.donate-form .donate-submit:hover { background: #fff; color: #131313; }
.donate-small { font-size: 14px; line-height: 1.4; color: #2B2B2B; }
.donate-small a { text-decoration: underline; margin-left: 4px; }

.donate-message { background: #131313; color: #fff; border-radius: 20px; padding: 14px 20px; margin: 0 0 18px; }
.donate-message.is-error { background: #A5243B; }
.donate-message p { margin: 0; }
.donate-message .donate-invoice { display: inline-block; margin-top: 10px; color: #fff; border: 1px solid #fff; border-radius: 15px; padding: 4px 14px; font-size: 14px; text-decoration: none; transition: .3s ease-in-out; }
.donate-message .donate-invoice:hover { background: #fff; color: #131313; }

/* The donor's own page (?octet_my_gift=…) */
.donate-mine { max-width: 640px; }
.donate-mine .donate-form { margin-top: 28px; justify-items: start; }

/* Phones (and touch screens): amounts, choices and fields at least 44px high, what a fingertip needs. */
@media (max-width: 640px), (pointer: coarse) {
	.donate-choice span { padding-block: 12px; }
	.donate-field :is(input, textarea) { min-height: 44px; padding-block: 10px; }
	.donate-check input { width: 22px; height: 22px; }
	.donate-small a { display: inline-block; padding-block: 12px; }
}
/* A long word without spaces (a URL, a name) wraps instead of being cut off. */
.donate-block :is(h2, .prose) { overflow-wrap: anywhere; }
