/* Pilot page: "Stay in the loop" floating button + modal overlay.
   Reuses tokens from design-system.css and patterns from login-modal/pilot.html. */

/* ---------- Floating action button ---------- */
.rb-nlo-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1900;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border: none;
    border-radius: 100px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 45%, #9333ea 100%);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35),
                0 2px 6px rgba(147, 51, 234, 0.18);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}
.rb-nlo-fab.rb-nlo-fab--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.rb-nlo-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.45),
                0 4px 10px rgba(147, 51, 234, 0.22);
}
.rb-nlo-fab:focus-visible {
    outline: 3px solid rgba(249, 115, 22, 0.45);
    outline-offset: 3px;
}
.rb-nlo-fab svg { flex-shrink: 0; }
.rb-nlo-fab__label { white-space: nowrap; }

@media (max-width: 480px) {
    .rb-nlo-fab {
        padding: 14px;
        gap: 0;
    }
    .rb-nlo-fab__label {
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* ---------- Modal ---------- */
.rb-nlo-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.rb-nlo-modal.rb-nlo-modal--open { display: flex; }

.rb-nlo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(19, 17, 26, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.rb-nlo-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 24px;
    padding: 40px 36px 36px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    animation: rbNloSlideIn 0.3s ease-out;
}
@keyframes rbNloSlideIn {
    from { transform: translateY(-20px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0)      scale(1);    opacity: 1; }
}

.rb-nlo-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.rb-nlo-close:hover {
    background: rgba(249, 115, 22, 0.08);
    color: #ea580c;
}
.rb-nlo-close:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.rb-nlo-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(147,51,234,0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.rb-nlo-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin: 0 0 8px;
}
.rb-nlo-title span {
    background: linear-gradient(135deg, #f97316, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rb-nlo-sub {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: #6b7280;
    margin: 0 0 22px;
}

.rb-nlo-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rb-nlo-input {
    width: 100%;
    padding: 13px 16px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rb-nlo-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.rb-nlo-submit {
    padding: 13px 24px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.28);
    transition: transform 0.2s, box-shadow 0.2s;
}
.rb-nlo-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.38);
}
.rb-nlo-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.rb-nlo-status {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    min-height: 1.2em;
}
.rb-nlo-status--ok  { color: #059669; }
.rb-nlo-status--err { color: #dc2626; }

.rb-nlo-foot {
    margin-top: 18px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

.rb-nlo-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] .rb-nlo-card {
    background: #1e1a28;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .rb-nlo-title { color: #e8e2f0; }
[data-theme="dark"] .rb-nlo-sub   { color: #a8a0b8; }
[data-theme="dark"] .rb-nlo-close { color: #a8a0b8; }
[data-theme="dark"] .rb-nlo-close:hover {
    background: rgba(249, 115, 22, 0.12);
    color: #fb923c;
}
[data-theme="dark"] .rb-nlo-input {
    background: #16131e;
    border-color: #2a2535;
    color: #e8e2f0;
}
[data-theme="dark"] .rb-nlo-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}
[data-theme="dark"] .rb-nlo-foot { color: #6b6280; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .rb-nlo-fab,
    .rb-nlo-card {
        animation: none;
        transition: none;
    }
}

/* Body scroll lock helper */
body.rb-nlo-locked { overflow: hidden; }
