#nl-fab {
    position: fixed;
    bottom: 16px;
    left: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color, #3a8aff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(58,138,255,0.45);
    z-index: 9998;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#nl-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(58,138,255,0.6);
}
#nl-fab.open {
    transform: rotate(20deg) scale(1.05);
}
#nl-popup {
    position: fixed;
    bottom: 78px;
    left: 24px;
    z-index: 9999;
    width: 300px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transform-origin: bottom left;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
#nl-popup.open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}
#nl-popup-inner {
    background: var(--bg-surface, #1e2535);
    border: 1px solid var(--border-primary, rgba(255,255,255,0.1));
    border-radius: 16px;
    padding: 28px 22px 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.45);
    position: relative;
    text-align: center;
}
#nl-close {
    position: absolute;
    top: 10px;
    right: 13px;
    background: none;
    border: none;
    color: var(--text-secondary, #9ca3af);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.15s;
}
#nl-close:hover { color: var(--text-primary, #fff); }
#nl-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(58,138,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 20px;
    color: var(--accent-color, #3a8aff);
}
#nl-title {
    color: var(--text-primary, #fff);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
}
#nl-desc {
    color: var(--text-secondary, #9ca3af);
    font-size: 12px;
    margin: 0 0 16px;
    line-height: 1.5;
}
#nl-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#nl-email {
    width: 100%;
    background: var(--bg-primary, #131924);
    border: 1px solid var(--border-primary, rgba(255,255,255,0.1));
    border-radius: 8px;
    padding: 9px 12px;
    color: var(--text-primary, #fff);
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
    touch-action: manipulation;
}
#nl-email:focus { border-color: var(--accent-color, #3a8aff); }
#nl-submit {
    width: 100%;
    background: var(--accent-color, #3a8aff);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
#nl-submit:hover { opacity: 0.88; }
#nl-submit:disabled { opacity: 0.55; cursor: not-allowed; }
#nl-msg {
    font-size: 12px;
    margin-top: 10px;
    min-height: 16px;
    border-radius: 6px;
    padding: 0;
    transition: all 0.2s;
}
#nl-msg.ok { color: #10b981; }
#nl-msg.err { color: #f87171; }
#nl-privacy {
    color: var(--text-secondary, #6b7280);
    font-size: 11px;
    margin: 10px 0 0;
}
@media (max-width: 768px) {
    #nl-popup {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 78px;
        top: auto;
        transform: translateY(16px) scale(0.96);
        transform-origin: bottom left;
    }
    #nl-popup.open {
        transform: translateY(0) scale(1);
    }
    #nl-fab {
        left: 20px;
        bottom: 16px;
    }
    #nl-popup-inner {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

body.mobile-menu-open #nl-fab,
body.mobile-menu-open #nl-popup,
body.mobile-menu-open #nl-sidebar-icon {
    display: none !important;
}

#nl-sidebar-icon {
    position: fixed;
    left: 0;
    top: calc(50% + 54px);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 25px 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}
#nl-sidebar-icon:hover {
    background: linear-gradient(135deg, #0056b3, #003d80);
    transform: scale(1.08);
}

body:has(#nl-sidebar-icon) #nl-popup.open {
    transform-origin: left center;
}
