/* === CHAT WIDGET NEXONEURAL - PREMIUM GLASSMORPHISM === */

:root {
    --nn-primary: #10a37f;
    --nn-bg-chat: rgba(255, 255, 255, 0.95);
    --nn-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    --nn-border: rgba(255, 255, 255, 0.4);
}

/* Position Utility Classes */
.nn-pos-right #nn-chat-launcher {
    right: 25px;
    left: auto;
}

.nn-pos-right #nn-chat-widget {
    right: 30px;
    left: auto;
    transform-origin: bottom right;
}

.nn-pos-left #nn-chat-launcher {
    left: 25px;
    right: auto;
}

.nn-pos-left #nn-chat-widget {
    left: 30px;
    right: auto;
    transform-origin: bottom left;
}

#nn-chat-launcher {
    position: fixed;
    bottom: 90px;
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    background: var(--nn-primary);
    border: none;
    box-shadow: var(--nn-shadow);
    cursor: pointer;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#nn-chat-launcher:hover {
    transform: scale(1.1);
}

#nn-chat-launcher svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.nn-launcher-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    pointer-events: none;
    display: block;
}

#nn-chat-launcher.nn-has-avatar svg {
    display: none;
}

#nn-chat-widget {
    position: fixed;
    bottom: 165px;
    width: 380px;
    height: 550px;
    background: var(--nn-bg-chat);
    backdrop-filter: blur(12px);
    border: none;
    border-radius: 20px;
    box-shadow: var(--nn-shadow);
    z-index: 2147483646;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.nn-chat-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(20px) !important;
}

/* Header */
.nn-chat-header {
    background-color: var(--nn-primary);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.15) 100%);
    padding: 16px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.nn-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nn-chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: white;
    padding: 2px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.nn-online-status {
    display: block;
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

.nn-online-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 5px;
}

#nn-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* Messages */
.nn-messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #e2e8f0;
}

/* Estilo de burbujas */
.nn-msg {
    max-width: 85%;
    display: flex;
}

.nn-msg.bot {
    align-self: flex-start;
}

.nn-msg.user {
    align-self: flex-end;
}

.nn-msg-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.nn-msg-bubble strong {
    font-weight: 700 !important;
}

.bot .nn-msg-bubble {
    background: white;
    color: #334155;
    border-bottom-left-radius: 4px;
}

.user .nn-msg-bubble {
    background: var(--nn-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Input Area */
.nn-chat-input-area {
    padding: 15px;
    background: white;
    display: flex;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 20px 20px;
}

#nn-chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

#nn-chat-input:focus {
    border-color: var(--nn-primary);
}

#nn-chat-send {
    background: var(--nn-primary);
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: transform 0.2s;
}

#nn-chat-send:hover {
    transform: scale(1.05);
}

#nn-chat-send svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    max-height: none !important;
    display: block !important;
    fill: white !important;
}

/* Typing effect */
.nn-typing {
    display: flex;
    gap: 4px;
    padding: 5px;
}

.nn-typing span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.3s infinite;
}

.nn-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.nn-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-4px);
    }
}
