/**
 * PsiMatrix — Donate / Funding Page Styles
 *
 * Scoped to .pm-donate — no global side effects.
 * Follows the cyberpunk dark-terminal aesthetic of the main theme.
 *
 * @since 2026.06.14
 */

/* ── Shell & Layout ───────────────────────────────────────────────── */

.pm-donate {
    min-height: 80vh;
    padding: 4rem 0 6rem;
}

.pm-donate__shell {
    max-width: 680px;
    margin: 0 auto;
}

/* ── Header ───────────────────────────────────────────────────────── */

.pm-donate__title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp( 1.6rem, 4vw, 2.4rem );
    color: var( --pm-text, #c8c8c8 );
    margin-bottom: 0.75rem;
}

.pm-donate__lead {
    font-size: 1rem;
    color: var( --pm-muted, #888 );
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* ── What you're funding block ────────────────────────────────────── */

.pm-donate__what {
    border-left: 2px solid #39ff14;
    padding-left: 1.25rem;
    margin-bottom: 2.5rem;
}

.pm-donate__section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: #39ff14;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.pm-donate__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    color: var( --pm-text, #c8c8c8 );
}

.pm-donate__list li {
    padding: 0.3rem 0 0.3rem 1.2rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pm-donate__list li::before {
    content: '//';
    position: absolute;
    left: 0;
    color: #39ff14;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
}

.pm-donate__note {
    font-size: 0.8rem;
    color: var( --pm-muted, #666 );
    line-height: 1.6;
    margin: 0;
}

/* ── Test-mode banner ─────────────────────────────────────────────── */

.pm-donate__test-banner {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #ffd700;
    border: 1px solid #ffd700;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

/* ── Amount picker ────────────────────────────────────────────────── */

.pm-donate__amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.pm-donate__amount-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: var( --pm-text, #c8c8c8 );
    background: transparent;
    border: 1px solid #333;
    padding: 0.55rem 1.25rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
    min-width: 72px;
    text-align: center;
}

.pm-donate__amount-btn:hover {
    border-color: #39ff14;
    color: #39ff14;
}

.pm-donate__amount-btn--selected {
    border-color: #39ff14;
    color: #39ff14;
    box-shadow: 0 0 6px rgba( 57, 255, 20, 0.3 );
}

.pm-donate__custom-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #333;
    background: transparent;
    padding: 0 0.5rem;
    gap: 0.2rem;
    min-width: 120px;
}

.pm-donate__custom-wrap:focus-within {
    border-color: #39ff14;
    box-shadow: 0 0 4px rgba( 57, 255, 20, 0.3 );
}

.pm-donate__dollar {
    font-family: 'Share Tech Mono', monospace;
    color: var( --pm-muted, #888 );
    font-size: 1rem;
    flex-shrink: 0;
}

.pm-donate__custom-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: var( --pm-text, #c8c8c8 );
    width: 80px;
    padding: 0.5rem 0;
    -moz-appearance: textfield;
}

.pm-donate__custom-input::-webkit-outer-spin-button,
.pm-donate__custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pm-donate__custom-input::placeholder {
    color: #555;
}

/* ── Stripe Payment Element mount ─────────────────────────────────── */

.pm-donate__payment-element {
    margin-bottom: 1.25rem;
    min-height: 200px;
}

.pm-donate__element-loading {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #555;
    padding: 1rem 0;
    animation: pm-blink 1s step-start infinite;
}

@keyframes pm-blink {
    50% { opacity: 0; }
}

/* ── Status message ───────────────────────────────────────────────── */

.pm-donate__message {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    min-height: 1.4em;
    margin-bottom: 1rem;
}

.pm-donate__message--error {
    color: #ff4444;
}

.pm-donate__message--ok {
    color: #39ff14;
}

/* ── Submit button ────────────────────────────────────────────────── */

.pm-donate__submit {
    width: 100%;
    font-size: 1rem;
    letter-spacing: 0.1em;
    padding: 0.9rem 1.5rem;
    margin-bottom: 1rem;
}

.pm-donate__submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Success state ────────────────────────────────────────────────── */

.pm-donate__success {
    border-left: 2px solid #39ff14;
    padding: 1.5rem 1.5rem 1.5rem 1.25rem;
    margin-top: 1rem;
}

.pm-donate__success-headline {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: #39ff14;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.pm-donate__success-sub {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: #c8c8c8;
    margin-bottom: 1rem;
}

.pm-donate__again-link {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #555;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    transition: color 0.15s;
}

.pm-donate__again-link:hover {
    color: #39ff14;
}

/* ── Unavailable fallback ─────────────────────────────────────────── */

.pm-donate__unavailable {
    border-left: 2px solid #555;
    padding: 1rem 1.25rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: var( --pm-muted, #888 );
    line-height: 1.7;
}

.pm-donate__unavailable a {
    color: #39ff14;
}

/* ── Mobile ───────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {
    .pm-donate__amounts {
        flex-direction: column;
        align-items: stretch;
    }
    .pm-donate__custom-wrap {
        width: 100%;
    }
    .pm-donate__custom-input {
        width: 100%;
    }
}
