/* Chatbot Widget Styles */
#nr-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: var(--font-m, 'Inter', sans-serif);
}

#nr-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary, #2563eb);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#nr-chatbot-toggle:hover {
    transform: scale(1.1);
}

#nr-chatbot-toggle svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

#nr-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200, #e5e7eb);
}

#nr-chatbot-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#nr-chatbot-header {
    background: var(--primary, #2563eb);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#nr-chatbot-header-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}
#nr-chatbot-header-close:hover {
    opacity: 1;
}

#nr-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--gray-50, #f9fafb);
}

.nr-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.nr-chat-msg.bot {
    align-self: flex-start;
    background: white;
    color: var(--gray-800, #1f2937);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-bottom-left-radius: 4px;
}

.nr-chat-msg.user {
    align-self: flex-end;
    background: var(--primary, #2563eb);
    color: white;
    border-bottom-right-radius: 4px;
}

.nr-chat-msg.bot p { margin: 0 0 8px 0; }
.nr-chat-msg.bot p:last-child { margin: 0; }
.nr-chat-msg.bot ul, .nr-chat-msg.bot ol { margin: 8px 0; padding-left: 20px; }

#nr-chatbot-input-area {
    display: flex;
    padding: 12px;
    background: white;
    border-top: 1px solid var(--gray-200, #e5e7eb);
    gap: 8px;
}

#nr-chatbot-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

#nr-chatbot-input:focus {
    border-color: var(--primary, #2563eb);
}

#nr-chatbot-send {
    background: var(--primary, #2563eb);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#nr-chatbot-send:hover {
    background: var(--primary-dark, #1d4ed8);
}
#nr-chatbot-send svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-left: 2px; /* optical alignment */
}

.nr-chat-typing {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}
.nr-chat-typing div {
    width: 6px;
    height: 6px;
    background: var(--gray-400, #9ca3af);
    border-radius: 50%;
    animation: nrBounce 1.4s infinite ease-in-out both;
}
.nr-chat-typing div:nth-child(1) { animation-delay: -0.32s; }
.nr-chat-typing div:nth-child(2) { animation-delay: -0.16s; }

@keyframes nrBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}
