/* NEP HELP - Floating AI Assistant */

/* Floating Button */
.nep-help-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nep-help-fab:hover {
    transform: scale(1.1);
}

.nep-help-fab i {
    font-size: 1.8rem;
    color: white;
}

/* Chat Window */
.nep-help-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: rgba(15, 23, 42, 0.85);
    /* Glass Dark */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.nep-help-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.nep-help-header {
    background: linear-gradient(90deg, #6366f1, #818cf8);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.nep-help-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.nep-help-title span {
    font-size: 0.8rem;
    opacity: 0.9;
}

.nep-help-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nep-help-close:hover {
    opacity: 1;
}

/* Body */
.nep-help-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05), transparent 70%);
}

/* Scrollbar */
.nep-help-body::-webkit-scrollbar {
    width: 6px;
}

.nep-help-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Messages */
.msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: popIn 0.3s forwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg.bot {
    background: rgba(255, 255, 255, 0.08);
    border-top-left-radius: 2px;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.msg.user {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    align-self: flex-end;
    border-top-right-radius: 2px;
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

/* Markdown Styles inside bot msg */
.msg.bot strong {
    color: #818cf8;
}

.msg.bot ul {
    padding-left: 20px;
    margin: 8px 0;
}

.msg.bot li {
    margin-bottom: 4px;
}

.msg.bot h1,
.msg.bot h2,
.msg.bot h3 {
    font-size: 1rem;
    margin: 8px 0 4px 0;
    color: white;
}

/* Input Area */
.nep-help-input-area {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    gap: 10px;
}

.nep-help-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px 20px;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

.nep-help-input:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
}

.nep-help-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #6366f1;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nep-help-send:hover {
    background: #4f46e5;
}

/* Loading Dots */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Response */
@media (max-width: 480px) {
    .nep-help-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}

/* =========================================
   LIGHT MODE SUPPORT
   ========================================= */
[data-theme="light"] .nep-help-window {
    background: rgba(255, 255, 255, 0.95);
    border-color: #e2e8f0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .nep-help-body {
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.03), transparent 70%);
}

[data-theme="light"] .nep-help-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .msg.bot {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #e2e8f0;
}

[data-theme="light"] .msg.bot strong {
    color: #4f46e5;
}

[data-theme="light"] .msg.bot h1,
[data-theme="light"] .msg.bot h2,
[data-theme="light"] .msg.bot h3 {
    color: #1e293b;
}

[data-theme="light"] .nep-help-input-area {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .nep-help-input {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

[data-theme="light"] .nep-help-input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .nep-help-input:focus {
    border-color: #6366f1;
    background: #ffffff;
}

[data-theme="light"] .dot {
    background: #64748b;
}