/* DONATIONS MODAL */
.donations-modal {
    max-width: 860px;
    text-align: center;
}

.donation-subtitle {
    color: #666;
    margin-bottom: 14px;
    font-size: 16px;
}

body.dark-theme .donation-subtitle {
    color: #aaa;
}

.donation-copy {
    margin: 10px auto;
    max-width: 720px;
    color: #444;
    line-height: 1.5;
}

body.dark-theme .donation-copy {
    color: #ccc;
}

/* Donation cards resize from a two-column grid to one column on narrow screens. */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.donation-method {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

body.dark-theme .donation-method {
    background: rgba(50, 50, 50, 0.5);
}

.donation-method h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 44px;
    margin: 0 0 10px;
    color: #4CAF50;
    font-size: 18px;
    line-height: 1.2;
}

/* Heading links explain payment methods without changing the card layout. */
.donation-heading-link {
    color: inherit;
    font-size: 0.65em;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.qr-code {
    width: 160px;
    height: 160px;
    margin: 10px auto;
    display: block;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.05);
    border-color: #4CAF50;
}

.donation-address-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    margin: 10px 0 14px;
}

.address {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 52px;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 10px;
    border-radius: 5px;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.25;
    margin: 0;
}

/* Address font sizes scale down as wallet strings get longer. */
.donation-address-short {
    font-size: 13px;
}

.donation-address-medium {
    font-size: 11px;
}

.donation-address-long {
    font-size: 9px;
    line-height: 1.2;
}

body.dark-theme .address {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.copy-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    height: 40px;
    background: transparent;
    color: #111;
    border: none;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    margin: 0;
}

.copy-icon-btn::before,
.copy-icon-btn::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 2px;
}

.copy-icon-btn::before {
    transform: translate(-3px, 3px);
    opacity: 0.75;
}

.copy-icon-btn::after {
    background: #fff;
    transform: translate(3px, -3px);
}

.copy-icon-btn:hover {
    opacity: 0.7;
}

body.dark-theme .copy-icon-btn {
    color: #fff;
}

body.dark-theme .copy-icon-btn::after {
    background: #2f2f2f;
}

.kofi-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    width: 100%;
    margin-top: auto;
    padding: 8px 16px;
    border-radius: 5px;
    background: #4CAF50;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.kofi-link:hover {
    opacity: 0.9;
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.close-donations-btn {
    margin-top: 20px;
    background: #666;
    width: 100%;
}

@media (max-width: 560px) {
    .donations-modal {
        width: 94%;
        max-width: 94%;
    }

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

    .donation-method h3 {
        min-height: auto;
        font-size: 17px;
    }
}
