/* ================= Основной контейнер ================= */

.bot-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 320px;
    max-height: 420px;
    background: #ffffff;

    /* было 12px — делаем “помягче” */
    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    z-index: 9999;
    overflow: hidden;
}

/* Состояния открытия/закрытия (JS будет переключать класс) */
.bot-chat-widget.is-hidden {
    display: none;
}

/* ================= Launcher (кнопка открытия) ================= */

.bot-chat-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #2386a7;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none; /* по умолчанию скрыта, появляется когда чат закрыт */
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}

.bot-chat-launcher:hover {
    background: #076f92;
}

.bot-chat-launcher:focus {
    outline: none;
}

/* Когда чат скрыт — показываем launcher */
.bot-chat-launcher.is-visible {
    display: flex;
}

/* ================= Заголовок ================= */

.bot-chat-header {
    padding: 10px 12px;
    background: #2386a7;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bot-chat-title {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Кнопка закрытия */
.bot-chat-close {
    width: 32px;
    height: 32px;
    border: none;

    /* чуть более мягкая */
    border-radius: 10px;

    cursor: pointer;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bot-chat-close:hover {
    background: rgba(255,255,255,0.28);
}

.bot-chat-close:focus {
    outline: none;
}

/* ================= Лог (сообщения) ================= */

.bot-chat-log {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
    background: #f7f9fb;
}

/* ================= Поле ввода + кнопка ================= */

.bot-chat-input {
    display: flex;
    border-top: 1px solid #e0e0e0;
}

/*
  ВАЖНО:
  У тебя где-то в глобальных стилях, судя по скрину, есть правило,
  которое меняет padding/оформление input при вводе/фокусе
  (часто это :focus или :not(:placeholder-shown)).
  Поэтому фиксируем padding ЯВНО для всех состояний.
*/
.bot-chat-widget .bot-chat-text,
.bot-chat-widget .bot-chat-text:focus,
.bot-chat-widget .bot-chat-text:active,
.bot-chat-widget .bot-chat-text:not(:placeholder-shown) {
    background: #ffffff;
    border: none;
    color: #333333;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    margin: 0;

    /* фикс: одинаковый padding и когда placeholder есть, и когда пользователь печатает */
    padding: 10px 12px;

    width: 100%;
    box-sizing: border-box;
    outline: none;
    box-shadow: none;
    border-radius: 0;

    /* чтобы высота и текст выглядели стабильно */
    line-height: 1.2;
    min-height: 42px;

    /* убираем любые transition, навязанные глобальным стилем */
    -webkit-transition: none;
    -moz-transition: none;
    -ms-transition: none;
    -o-transition: none;
    transition: none;
}

.bot-chat-widget .bot-chat-send {
    border: none;
    padding: 0 14px;
    cursor: pointer;
    font-size: 16px;
    background: #2386a7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-chat-widget .bot-chat-send:hover {
    background: #076f92;
}

/* ================= Сообщения ================= */

.bot-msg {
    margin-bottom: 6px;
    line-height: 1.3;
    white-space: pre-line;
}

.bot-msg-user {
    text-align: right;
    color: #2386a7;
}

.bot-msg-bot {
    text-align: left;
    color: #333;
}

/* ================= Адаптив ================= */

@media (max-width: 480px) {
    .bot-chat-widget {
        right: 10px;
        bottom: 10px;
        width: 90vw;
        max-height: 60vh;
    }

    .bot-chat-launcher {
        right: 10px;
        bottom: 10px;
    }
}

/* ================= Быстрые кнопки (Меню) ================= */

/* Контейнер быстрых кнопок */
.bot-chat-widget .bot-quick-buttons,
.bot-chat-widget .bot-quick,
.bot-chat-widget .bot-buttons,
.bot-chat-widget .quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 6px;
}

/* СТИЛЬ КНОПОК: именно для .bot-quick-btn внутри .bot-quick-buttons */
.bot-chat-widget .bot-quick-buttons .bot-quick-btn,
.bot-chat-widget .bot-quick .bot-quick-btn,
.bot-chat-widget .bot-buttons .bot-quick-btn,
.bot-chat-widget .quick-replies .bot-quick-btn {
    -webkit-appearance: none;
    appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 10px;
    border-radius: 999px;

    border: 1px solid rgba(35, 134, 167, 0.25);
    background: rgba(35, 134, 167, 0.08);
    color: #0b5c74;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;

    cursor: pointer;

    -webkit-user-select: none;
    user-select: none;

    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

/* Hover */
.bot-chat-widget .bot-quick-buttons .bot-quick-btn:hover,
.bot-chat-widget .bot-quick .bot-quick-btn:hover,
.bot-chat-widget .bot-buttons .bot-quick-btn:hover,
.bot-chat-widget .quick-replies .bot-quick-btn:hover {
    background: rgba(35, 134, 167, 0.14);
    border-color: rgba(35, 134, 167, 0.35);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

/* Active */
.bot-chat-widget .bot-quick-buttons .bot-quick-btn:active,
.bot-chat-widget .bot-quick .bot-quick-btn:active,
.bot-chat-widget .bot-buttons .bot-quick-btn:active,
.bot-chat-widget .quick-replies .bot-quick-btn:active {
    transform: translateY(0);
    box-shadow: none;
    background: rgba(35, 134, 167, 0.18);
}

/* Focus */
.bot-chat-widget .bot-quick-buttons .bot-quick-btn:focus,
.bot-chat-widget .bot-quick .bot-quick-btn:focus,
.bot-chat-widget .bot-buttons .bot-quick-btn:focus,
.bot-chat-widget .quick-replies .bot-quick-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 134, 167, 0.22);
}

/* Primary (опционально) */
.bot-chat-widget .bot-quick-buttons .bot-quick-btn.is-primary {
    background: #2386a7;
    border-color: #2386a7;
    color: #fff;
}
.bot-chat-widget .bot-quick-buttons .bot-quick-btn.is-primary:hover {
    background: #076f92;
    border-color: #076f92;
}

/* Мобилка */
@media (max-width: 480px) {
    .bot-chat-widget .bot-quick-buttons .bot-quick-btn,
    .bot-chat-widget .bot-quick .bot-quick-btn,
    .bot-chat-widget .bot-buttons .bot-quick-btn,
    .bot-chat-widget .quick-replies .bot-quick-btn {
        padding: 8px 10px;
        font-size: 13px;
    }
}