/* Fundraising banner in the Wikipedia-appeal style. Opens via a grid-row
   transition (smooth at any content height) with a fade, sits in flow above
   the original layout, stacks on phones. The original layout uses 100svw
   boxes, which overflow as soon as a scrollbar appears; clip that. */
body {
    overflow-x: hidden;
}

.donateBanner {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    background: #fef6c7;
    border-bottom: 0 solid #d8a800;
    color: #111;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.4;
    transition: grid-template-rows 1.4s cubic-bezier(0.25, 0.8, 0.3, 1), opacity 1.2s ease, border-bottom-width 1.4s;
}

.donateBanner.donateVisible {
    grid-template-rows: 1fr;
    opacity: 1;
    border-bottom-width: 4px;
}

.donateInner {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.donateBar {
    position: relative;
    height: 1.4rem;
    margin: 0.9rem auto 0;
    max-width: 44rem;
    background: #fff;
    border: 2px solid #d8a800;
    border-radius: 0.7rem;
    overflow: hidden;
}

.donateBarFill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #d8a800, #ff3d00);
    transition: width 3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.donateBarLabel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.donateAppeal {
    max-width: 44rem;
    margin: 0 auto;
    padding: 0.9rem 2.6rem 0 1rem;
}

.donateHeadline {
    margin: 0 0 0.4rem;
    font-weight: 900;
    font-size: 1.4rem;
    line-height: 1.2;
}

.donateText {
    margin: 0;
    font-size: 1.05rem;
}

.donateText strong {
    font-weight: 900;
    background: #ffe36b;
    padding: 0 0.2rem;
}

.donateRow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.7rem 1rem;
    padding: 0.9rem 1rem 1rem;
}

.donateButton,
.donateShare,
.donateSpread {
    cursor: pointer;
    border-radius: 6px;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    text-align: center;
}

.donateButton {
    border: none;
    padding: 0.65rem 1.8rem;
    font-size: 1.15rem;
    background: #d8a800;
    color: #000;
    animation: donatePulse 1.1s ease-in-out infinite;
}

.donateShare,
.donateSpread {
    border: 2px solid #111;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #111;
}

@keyframes donatePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 61, 0, 0.6); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 0.6rem rgba(255, 61, 0, 0); }
}

.donatePanel[hidden] {
    display: none;
}

.donatePanel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    padding: 0.2rem 1rem 1.2rem;
}

.donateSoon {
    margin: 0;
    font-style: italic;
}

.donateCard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 15rem;
    max-width: 100%;
    padding: 0.6rem;
    background: #fff;
    border: 1px solid #d8a800;
    border-radius: 6px;
}

.donateCoin {
    font-weight: 900;
}

.donateCoin span {
    font-weight: normal;
    color: #666;
}

.donateQr svg {
    width: 9rem;
    height: 9rem;
    display: block;
}

.donateAddress {
    font-size: 0.75rem;
    word-break: break-all;
    text-align: center;
}

.donateActions {
    display: flex;
    gap: 0.5rem;
}

.donateCopy,
.donateOpen {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid #d8a800;
    border-radius: 3px;
    background: #fef6c7;
    color: #222;
    font: inherit;
    font-size: 0.85rem;
    padding: 0.15rem 0.6rem;
    text-decoration: none;
}

.donateClose {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    cursor: pointer;
    border: none;
    background: none;
    color: #111;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
}

@media (max-width: 600px) {
    .donateBar {
        margin: 0.7rem 0.8rem 0;
    }

    .donateAppeal {
        padding: 0.8rem 2.4rem 0 0.8rem;
    }

    .donateHeadline {
        font-size: 1.2rem;
    }

    .donateText {
        font-size: 0.98rem;
    }

    .donateRow {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem 0.8rem 0.9rem;
    }

    .donateSpread {
        display: block;
    }

    .donateButton {
        font-size: 1.25rem;
        padding: 0.8rem;
    }
}
