.temporarily-hidden {
    display: none !important;
}

.donation-nav-btn {
    white-space: nowrap;
}

body.donation-modal-open {
    overflow: hidden;
}

.donation-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 180ms ease;
}

.donation-modal[hidden] {
    display: none !important;
}

.donation-modal.is-open {
    opacity: 1;
}

.donation-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(1, 3, 8, 0.78);
    backdrop-filter: blur(10px);
    cursor: default;
}

.donation-dialog {
    position: relative;
    width: min(100%, 440px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: #101218;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    text-align: center;
    transform: translateY(10px) scale(0.985);
    transition: transform 180ms ease;
}

.donation-modal.is-open .donation-dialog {
    transform: translateY(0) scale(1);
}

.donation-dialog__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease;
}

.donation-dialog__close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.donation-dialog__close svg {
    width: 20px;
    height: 20px;
}

.donation-dialog__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #fbbf24;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.donation-dialog__header h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.025em;
}

.donation-dialog__header p {
    max-width: 34ch;
    margin: 9px auto 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.83rem;
    line-height: 1.55;
}

.donation-dialog__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 22px 0 18px;
}

.donation-dialog__qr img {
    width: 188px;
    height: 188px;
    display: block;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
}

.donation-dialog__qr a {
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
    text-underline-offset: 3px;
    transition: color 160ms ease;
}

.donation-dialog__qr a:hover {
    color: #fbbf24;
}

.donation-dialog__address {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    text-align: left;
}

.donation-dialog__address span {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.66rem;
}

.donation-dialog__address code {
    display: block;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    user-select: all;
}

.donation-copy-btn {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 0 16px;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.donation-copy-btn svg {
    width: 17px;
    height: 17px;
}

.donation-copy-btn:hover {
    border-color: rgba(251, 191, 36, 0.58);
    background: rgba(251, 191, 36, 0.15);
}

.donation-copy-btn:active {
    transform: translateY(1px);
}

.donation-copy-btn:focus-visible,
.donation-dialog__close:focus-visible,
.donation-dialog__qr a:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 3px;
}

.donation-copy-btn.is-copied {
    border-color: rgba(52, 211, 153, 0.48);
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.donation-dialog__note {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.7rem;
    line-height: 1.5;
}

.donation-copy-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 520px) {
    .donation-modal {
        align-items: end;
        padding: 12px;
    }

    .donation-dialog {
        width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 28px 20px 22px;
        border-radius: 20px;
    }

    .donation-dialog__qr img {
        width: 172px;
        height: 172px;
    }
}
