/* Donation popup styles used on selected high-traffic pages */
.donation-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.donation-popup-overlay.is-visible {
    display: flex;
}

.donation-popup {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(170deg, #ffffff, #f6faf9);
    color: #2C3E50;
    border-radius: 14px;
    border: 1px solid rgba(0, 58, 65, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 22px;
}

.donation-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.donation-popup-title {
    margin: 0;
    font-size: 1.2rem;
    color: #003a41;
}

.donation-popup-close {
    border: 0;
    background: transparent;
    color: #003a41;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 4px;
}

.donation-popup-close:hover {
    background: rgba(0, 58, 65, 0.08);
}

.donation-popup-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #003a41;
    background: #003a41;
    color: #ffffff;
    border-radius: 6px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

.donation-popup-qr-wrap {
    margin-top: 10px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    background: rgba(23, 148, 134, 0.08);
    border: 1px solid rgba(23, 148, 134, 0.18);
    border-radius: 10px;
    padding: 10px;
}

.donation-popup-qr {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    background: #ffffff;
}

.donation-popup-qr-copy {
    min-width: 0;
}

.donation-popup-copy:hover {
    background: #179486;
    border-color: #179486;
}

.donation-popup-meta {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #4c5f6b;
    word-break: break-all;
}

.donation-popup-status {
    margin: 10px 0 0;
    min-height: 18px;
    font-size: 0.9rem;
    color: #003a41;
}

.donation-popup-disclaimer {
    margin: 14px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 58, 65, 0.12);
    font-size: 0.8rem;
    color: #7a8a93;
    text-align: center;
}

.donation-popup-link {
    margin-left: 10px;
    color: #003a41;
    font-weight: 600;
}

[data-theme="dark"] .donation-popup {
    background: linear-gradient(170deg, #2C3E50, #263445);
    color: #f3f3f3;
    border-color: rgba(222, 158, 53, 0.35);
}

[data-theme="dark"] .donation-popup-title,
[data-theme="dark"] .donation-popup-close,
[data-theme="dark"] .donation-popup-link,
[data-theme="dark"] .donation-popup-status {
    color: #DE9E35;
}

[data-theme="dark"] .donation-popup-disclaimer {
    color: #a0abb8;
    border-top-color: rgba(222, 158, 53, 0.2);
}

[data-theme="dark"] .donation-popup-meta {
    color: #e4e4e4;
}

[data-theme="dark"] .donation-popup-copy {
    background: #DE9E35;
    border-color: #DE9E35;
    color: #1a1a1a;
}

[data-theme="dark"] .donation-popup-copy:hover {
    background: #f0b24e;
    border-color: #f0b24e;
}

[data-theme="dark"] .donation-popup-qr-wrap {
    background: rgba(222, 158, 53, 0.14);
    border-color: rgba(222, 158, 53, 0.35);
}

@media (max-width: 600px) {
    .donation-popup {
        padding: 16px;
    }

    .donation-popup-qr-wrap {
        grid-template-columns: 1fr;
    }

    .donation-popup-qr {
        width: 92px;
        height: 92px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .donation-popup-overlay,
    .donation-popup {
        transition: none !important;
        animation: none !important;
    }
}
