/* Newsletter pop-up — rendered on every page, shown by newsletter-popup.js.
   Dark panel on a dimmed backdrop, centered, modest width. The copy and the
   form live inside; see debt/templates/debt/includes/_newsletter_popup.html. */

.np-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(5, 8, 20, 0.72);
    animation: np-fade-in 180ms ease-out;
}

.np-overlay[hidden] { display: none; }

@keyframes np-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.np-panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #0A0E27;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 2rem 1.75rem 1.5rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
    color: #E2E8F0;
    font-family: 'Inter', sans-serif;
    animation: np-slide-up 220ms ease-out;
}

@keyframes np-slide-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.np-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: 0;
    color: #94A3B8;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}
.np-close:hover { color: #E2E8F0; background: rgba(255, 255, 255, 0.06); }
.np-close:focus-visible {
    outline: 2px solid #34D399;
    outline-offset: 2px;
}

.np-eyebrow {
    margin: 0 0 0.4rem;
    color: #34D399;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.np-heading {
    margin: 0 0 0.6rem;
    font-size: 1.4rem;
    line-height: 1.25;
    color: #F1F5F9;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.np-body {
    margin: 0 0 1.25rem;
    color: #CBD5E1;
    line-height: 1.55;
    font-size: 0.95rem;
}

.np-form { margin: 0; }

.np-field { display: block; margin: 0 0 0.9rem; }

.np-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #F1F5F9;
    font-size: 0.95rem;
    font-family: inherit;
}
.np-input::placeholder { color: #64748B; }
.np-input:focus {
    outline: none;
    border-color: #34D399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.18);
}

.np-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.np-btn {
    padding: 0.65rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.np-btn-primary {
    background: #F59E0B;
    color: #1A1A1A;
    flex: 1;
}
.np-btn-primary:hover { background: #FBBF24; }
.np-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.np-btn-ghost {
    background: transparent;
    color: #94A3B8;
    border-color: rgba(255, 255, 255, 0.12);
}
.np-btn-ghost:hover { color: #E2E8F0; border-color: rgba(255, 255, 255, 0.24); }

.np-btn:focus-visible {
    outline: 2px solid #34D399;
    outline-offset: 2px;
}

.np-status {
    min-height: 1.2em;
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #94A3B8;
}
.np-status.is-error { color: #FCA5A5; }
.np-status.is-success { color: #86EFAC; }

.np-footnote {
    margin: 1.1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: #94A3B8;
    line-height: 1.5;
}
.np-footnote a {
    color: #34D399;
    text-decoration: none;
    font-weight: 600;
}
.np-footnote a:hover { text-decoration: underline; }

/* Visually hidden helper used by the email label. */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0);
    border: 0;
}

@media (max-width: 480px) {
    .np-panel { padding: 1.6rem 1.25rem 1.25rem; }
    .np-heading { font-size: 1.2rem; }
    .np-actions { flex-direction: column; align-items: stretch; }
    .np-btn-primary, .np-btn-ghost { width: 100%; flex: none; }
}
