/* ════════════════════════════════════════
   Chatbot Net-Progress — styles
   ════════════════════════════════════════ */

.np-chat-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: #10B981;
    border: none;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 10px 30px -8px rgba(16, 185, 129, 0.55),
        0 4px 14px -4px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 300;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #052E22;
}
.np-chat-launcher:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.3) inset,
        0 14px 36px -8px rgba(16, 185, 129, 0.7),
        0 6px 18px -4px rgba(0, 0, 0, 0.5);
}
.np-chat-launcher svg {
    width: 26px;
    height: 26px;
    stroke: #052E22;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.np-chat-launcher::after {
    /* Pulse ring */
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 2px solid #10B981;
    opacity: 0;
    animation: np-chat-pulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes np-chat-pulse {
    0% { opacity: 0.5; transform: scale(0.9); }
    70% { opacity: 0; transform: scale(1.25); }
    100% { opacity: 0; transform: scale(1.25); }
}

/* Hide launcher when panel is open */
.np-chat-root.open .np-chat-launcher {
    transform: scale(0) rotate(45deg);
    pointer-events: none;
}

/* ───── Panel ───── */
.np-chat-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 48px);
    background: linear-gradient(180deg, #111A2E 0%, #0B1220 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 301;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-family: 'Inter', system-ui, sans-serif;
}
.np-chat-root.open .np-chat-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.np-chat-header {
    padding: 14px 16px;
    background: rgba(7, 11, 20, 0.6);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}
.np-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6EE7B7;
    font-weight: 700;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    position: relative;
}
.np-chat-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #10B981;
    border: 2px solid #0B1220;
}
.np-chat-title {
    flex-grow: 1;
    min-width: 0;
}
.np-chat-title-name {
    font-weight: 600;
    font-size: 14px;
    color: #E2E8F0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.np-chat-title-status {
    font-size: 11px;
    color: #94A3B8;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}
.np-chat-title-status::before {
    content: '●';
    color: #10B981;
    margin-right: 4px;
    font-size: 8px;
    vertical-align: middle;
}
.np-chat-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.np-chat-close:hover {
    color: #E2E8F0;
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.06);
}
.np-chat-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

/* Body (messages) */
.np-chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 18px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}
.np-chat-body::-webkit-scrollbar { width: 6px; }
.np-chat-body::-webkit-scrollbar-track { background: transparent; }
.np-chat-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
}

.np-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    word-wrap: break-word;
    animation: np-msg-in 0.3s ease;
}
@keyframes np-msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.np-msg-bot {
    align-self: flex-start;
    background: rgba(23, 32, 51, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: #E2E8F0;
    border-bottom-left-radius: 4px;
}
.np-msg-user {
    align-self: flex-end;
    background: #10B981;
    color: #052E22;
    font-weight: 500;
    border-bottom-right-radius: 4px;
}
.np-msg a {
    color: #6EE7B7;
    text-decoration: underline;
    text-decoration-color: rgba(110, 231, 183, 0.4);
}
.np-msg-user a {
    color: #064E3B;
    text-decoration-color: rgba(5, 46, 34, 0.5);
}
.np-msg p { margin: 0; }
.np-msg p + p { margin-top: 8px; }
.np-msg ul {
    margin: 6px 0 0;
    padding-left: 18px;
}
.np-msg li {
    margin-bottom: 3px;
}
.np-msg strong { font-weight: 600; color: #F1F5F9; }
.np-msg-user strong { color: #022C22; }

/* Typing indicator */
.np-typing {
    align-self: flex-start;
    background: rgba(23, 32, 51, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
    padding: 12px 14px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 4px;
    animation: np-msg-in 0.3s ease;
}
.np-typing span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #10B981;
    animation: np-typing-bounce 1.2s infinite;
}
.np-typing span:nth-child(2) { animation-delay: 0.15s; }
.np-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes np-typing-bounce {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

/* Suggested chips */
.np-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    flex-shrink: 0;
}
.np-chat-chip {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.06);
    color: #6EE7B7;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.np-chat-chip:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}
.np-chat-chip:disabled { opacity: 0.5; cursor: not-allowed; }

/* Footer with dual CTA */
.np-chat-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 16px 10px;
    animation: np-msg-in 0.4s ease;
}
.np-chat-cta {
    padding: 10px 11px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}
.np-chat-cta-primary {
    background: #10B981;
    border: 1px solid #10B981;
}
.np-chat-cta-primary:hover {
    background: #6EE7B7;
    border-color: #6EE7B7;
    transform: translateY(-1px);
}
.np-chat-cta-secondary {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.np-chat-cta-secondary:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}
.np-chat-cta-icon {
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1;
}
.np-chat-cta-primary .np-chat-cta-icon { color: #052E22; }
.np-chat-cta-secondary .np-chat-cta-icon { color: #6EE7B7; }

.np-chat-cta-text {
    flex-grow: 1;
    min-width: 0;
    font-size: 12px;
    line-height: 1.25;
}
.np-chat-cta-text b {
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.np-chat-cta-text span {
    display: block;
    font-size: 10.5px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    margin-top: 2px;
    opacity: 0.85;
}
.np-chat-cta-primary .np-chat-cta-text b { color: #052E22; }
.np-chat-cta-primary .np-chat-cta-text span { color: rgba(5, 46, 34, 0.75); }
.np-chat-cta-secondary .np-chat-cta-text b { color: #E2E8F0; }
.np-chat-cta-secondary .np-chat-cta-text span { color: #94A3B8; }

@media (max-width: 380px) {
    .np-chat-cta-grid { grid-template-columns: 1fr; }
}

/* Input area */
.np-chat-input {
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(7, 11, 20, 0.4);
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.np-chat-textarea {
    flex-grow: 1;
    background: rgba(23, 32, 51, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    padding: 10px 12px;
    color: #E2E8F0;
    font-size: 13.5px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    min-height: 40px;
    line-height: 1.4;
    transition: border-color 0.2s;
}
.np-chat-textarea::placeholder { color: #64748B; }
.np-chat-textarea:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(23, 32, 51, 0.7);
}
.np-chat-send {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #10B981;
    border: none;
    color: #052E22;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.np-chat-send:hover:not(:disabled) { background: #6EE7B7; transform: translateY(-1px); }
.np-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.np-chat-send svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.np-chat-footer-note {
    padding: 0 14px 8px;
    font-size: 10px;
    color: #64748B;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    letter-spacing: 0.02em;
}

@media (max-width: 480px) {
    .np-chat-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 85vh;
        border-radius: 16px 16px 0 0;
    }
    .np-chat-launcher { bottom: 18px; right: 18px; width: 54px; height: 54px; }
}
