#aibot-widget-root {
    --aibot-accent: #2C4A3E;
    --aibot-bg: #FAF9F5;
    --aibot-bubble-bot: #F0EAE1;
    --aibot-text: #3C3730;
    --aibot-border: #E1DDD5;
    --aibot-muted: #A39E95;
    --aibot-rose: #A36A5E;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
}

#aibot-widget-root * {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* КНОПКА ВЫЗОВА */
#aibot-widget-root .aibot-open-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background-color: var(--aibot-accent);
    color: var(--aibot-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(44, 74, 62, 0.15);
    z-index: 10000;
    transition: transform 0.2s;
}

#aibot-widget-root .aibot-open-button:hover {
    transform: scale(1.04);
}

/* ОКНО ЧАТА */
#aibot-widget-root .aibot-window {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 510px;
    background-color: var(--aibot-bg);
    border-radius: 24px;
    border: 1px solid var(--aibot-border);
    z-index: 10000;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(44, 74, 62, 0.06);
}

#aibot-widget-root .aibot-window.open {
    display: flex;
}

/* ШАПКА */
#aibot-widget-root .aibot-header {
    padding: 20px 24px;
    background-color: var(--aibot-bg);
    border-bottom: 1px solid #EAE6DF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#aibot-widget-root .aibot-header h3 {
    font-size: 14px;
    color: var(--aibot-accent);
    font-weight: 500;
    letter-spacing: 0.1px;
    margin: 0;
}

#aibot-widget-root .aibot-close,
#aibot-widget-root .aibot-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--aibot-muted);
}

#aibot-widget-root .aibot-close {
    font-size: 16px;
    margin-left: 10px;
}

/* ПОЛЕ СООБЩЕНИЙ */
#aibot-widget-root .aibot-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background-color: var(--aibot-bg);
    display: flex;
    flex-direction: column;
}

#aibot-widget-root .aibot-messages::-webkit-scrollbar {
    width: 3px;
}

#aibot-widget-root .aibot-messages::-webkit-scrollbar-thumb {
    background: var(--aibot-border);
    border-radius: 3px;
}

/* ПУЗЫРИ */
#aibot-widget-root .aibot-msg {
    max-width: 85%;
    padding: 11px 15px;
    margin-bottom: 12px;
    font-size: 14px;
    border-radius: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

#aibot-widget-root .aibot-msg.bot {
    background-color: var(--aibot-bubble-bot);
    color: var(--aibot-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#aibot-widget-root .aibot-msg.user {
    background-color: var(--aibot-accent);
    color: var(--aibot-bg);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* НИЖНЯЯ ЗОНА */
#aibot-widget-root .aibot-footer {
    padding: 16px 24px 20px 24px;
    background-color: var(--aibot-bg);
    border-top: 1px solid #EAE6DF;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#aibot-widget-root .aibot-input-row {
    position: relative;
    display: flex;
    align-items: center;
}

#aibot-widget-root .aibot-input-field {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1px solid var(--aibot-border);
    border-radius: 14px;
    outline: none;
    font-size: 14px;
    color: var(--aibot-text);
    background-color: var(--aibot-bg);
    transition: border-color 0.2s;
}

#aibot-widget-root .aibot-input-field:focus {
    border-color: var(--aibot-accent);
}

#aibot-widget-root .aibot-send-btn {
    position: absolute;
    right: 12px;
    background: none;
    color: var(--aibot-accent);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* КНОПКА ОПЕРАТОРА */
#aibot-widget-root .aibot-operator-btn {
    width: 100%;
    background-color: var(--aibot-bg);
    color: var(--aibot-rose);
    border: 1px solid #E6DFD5;
    padding: 11px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#aibot-widget-root .aibot-operator-btn:hover {
    background-color: #F5F0E6;
    border-color: #D3C9BC;
}

#aibot-widget-root .aibot-operator-btn:disabled {
    background-color: var(--aibot-bubble-bot);
    color: var(--aibot-muted);
    border-color: var(--aibot-border);
    cursor: not-allowed;
}

#aibot-widget-root .aibot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

#aibot-widget-root .aibot-typing span {
    width: 4px;
    height: 4px;
    background-color: var(--aibot-muted);
    border-radius: 50%;
    display: inline-block;
    animation: aibot-bounce 1.4s infinite ease-in-out both;
}

#aibot-widget-root .aibot-typing span:nth-child(1) { animation-delay: -0.32s; }
#aibot-widget-root .aibot-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes aibot-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}
