/* ═══════════════════════════════════════════════════════════════════
   hazPDF — Buy Me a Coffee Donation Component
   Minimalist, elegant donation modal with QRIS + PayPal support
   ═══════════════════════════════════════════════════════════════════ */

/* ── Floating Donation Button ──────────────────────────────────── */
.donate-fab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Noto Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.donate-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.donate-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

.donate-fab:hover::before {
    opacity: 1;
}

.donate-fab:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
}

.donate-fab span,
.donate-fab .fab-emoji {
    position: relative;
    z-index: 1;
}

.donate-fab .fab-emoji {
    font-size: 18px;
    animation: gentle-bounce 2s infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ── Fullscreen Modal Overlay ─────────────────────────────────── */
.donate-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    opacity: 0;
}

.donate-overlay.active {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    visibility: visible;
    opacity: 1;
}

/* ── Modal Card ────────────────────────────────────────────────── */
.donate-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(30px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.donate-overlay.active .donate-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ── Modal Header ──────────────────────────────────────────────── */
.donate-header {
    position: relative;
    padding: 28px 28px 0;
    text-align: center;
}

.donate-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 50%;
    font-size: 28px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

.donate-header h2 {
    font-family: 'Noto Sans', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.donate-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Close Button ──────────────────────────────────────────────── */
.donate-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
    z-index: 2;
}

.donate-close:hover {
    background: var(--border-color);
    color: var(--text-main);
}

.donate-close svg {
    width: 16px;
    height: 16px;
}

/* ── Tab Switcher ──────────────────────────────────────────────── */
.donate-tabs {
    display: flex;
    margin: 24px 28px 0;
    padding: 4px;
    background: var(--bg-primary);
    border-radius: 12px;
    gap: 4px;
}

.donate-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Noto Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.donate-tab.active {
    background: #fff;
    color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.donate-tab:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.6);
}

/* ── Tab Content Panel ─────────────────────────────────────────── */
.donate-content {
    padding: 24px 28px 28px;
    text-align: center;
}

.donate-panel {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.donate-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── QRIS Panel ────────────────────────────────────────────────── */
.donate-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.donate-qr-img {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    background: #fff;
    object-fit: contain;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.donate-qr-amount {
    display: flex;
    align-items: center;
    gap: 12px;
}

.donate-amount-chip {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: #fff;
    color: var(--text-main);
    font-family: 'Noto Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.donate-amount-chip:hover,
.donate-amount-chip.selected {
    border-color: var(--color-primary);
    background: #eff6ff;
    color: var(--color-primary);
}

.donate-qr-steps {
    width: 100%;
    text-align: left;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px 20px;
}

.donate-qr-steps p {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px;
}

.donate-qr-steps ol {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.donate-qr-steps li {
    counter-increment: step;
    font-size: 13px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.donate-qr-steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

/* ── PayPal Panel ──────────────────────────────────────────────── */
.donate-paypal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.donate-paypal-illustration {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
}

.donate-paypal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0070ba, #005ea6);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Noto Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 112, 186, 0.3);
}

.donate-paypal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 112, 186, 0.4);
    color: #fff;
    text-decoration: none;
}

.donate-paypal-btn:active {
    transform: translateY(0);
}

.donate-paypal-btn .pp-icon {
    width: 22px;
    height: 22px;
}

.donate-paypal-note {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.donate-paypal-note a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.donate-paypal-note a:hover {
    text-decoration: underline;
}

/* ── Modal Footer ──────────────────────────────────────────────── */
.donate-footer {
    padding: 0 28px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .donate-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
        max-height: 85vh;
        overflow-y: auto;
    }

    .donate-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .donate-header {
        padding: 20px 20px 0;
    }

    .donate-tabs {
        margin: 20px 20px 0;
    }

    .donate-content {
        padding: 20px;
    }

    .donate-qr-img {
        width: 160px;
        height: 160px;
    }

    .donate-amount-chip {
        font-size: 13px;
        padding: 6px 12px;
    }

    .donate-fab {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (min-width: 481px) {
    .donate-amount-chip {
        font-size: 14px;
        padding: 8px 18px;
    }
}