﻿#nexora-chat {
    --chat-primary: #34513d;
    --chat-background: #f7f3ed;
    font-family: Arial, sans-serif;
    position: fixed;
    bottom: 90px;
    right: 22px;
    z-index: 9999;
    font-size: 14px;
}

#nexora-chat * {
    box-sizing: border-box;
}

.nexora-launcher {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-left: auto;
    border: none;
    border-radius: 50%;
    background: var(--chat-primary);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 16px #0002;
}

.nexora-launcher svg {
    width: 25px;
    height: 25px;
}

.nexora-panel {
    display: flex;
    flex-direction: column;
    width: 360px;
    height: 490px;
    max-height: calc(100dvh - 180px);
    background: white;
    border: 1px solid #dcded7;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 8px 30px #0002;
}

.nexora-panel[hidden] {
    display: none;
}

.nexora-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--chat-primary);
    color: white;
    padding: 18px;
}

.nexora-header strong {
    display: block;
    font-size: 16px;
}

.nexora-header small {
    display: block;
    margin-top: 5px;
    opacity: .8;
}

.nexora-close {
    background: transparent;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.nexora-messages {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    gap: 12px;
    background: var(--chat-background);
}

.nexora-message {
    padding: 12px;
    border-radius: 12px;
    max-width: 90%;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.nexora-message.assistant {
    align-self: flex-start;
    background: white;
    color: #29372d;
}

.nexora-message.user {
    align-self: flex-end;
    background: var(--chat-primary);
    color: white;
}

.nexora-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
}

.nexora-suggestions button {
    border: 1px solid #c4d0c1;
    background: white;
    color: var(--chat-primary);
    border-radius: 20px;
    padding: 7px 11px;
    font-size: 11px;
    cursor: pointer;
}

.nexora-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #ddd;
}

.nexora-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ccd2c9;
    border-radius: 8px;
    padding: 10px;
    font-size: 16px;
    color: #29372d;
    background: white;
}

.nexora-send {
    background: var(--chat-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
}

.nexora-send:disabled {
    opacity: .5;
    cursor: wait;
}

.nexora-footer {
    font-size: 10px;
    color: #777;
    text-align: center;
    padding: 0 10px 10px;
}

@media (max-width: 480px) {
    #nexora-chat {
        right: 12px;
        bottom: 85px;
    }

    .nexora-panel {
        width: calc(100vw - 24px);
        height: 500px;
        max-height: calc(100dvh - 175px);
    }
}
