/* -------------------------------------------------
   ОКНО ОПЕРАТОРА
   ------------------------------------------------- */
#operator-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 150px;
    /* Состояние "collapsed" указывает высоту заголовка */
    height: 30px;
    background: #2d89ef;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    overflow: hidden;
    transition: height .3s ease, width .3s ease;
    z-index: 9999;
}

/* ---------- открытое окно ---------- */
#operator-widget.open {
    height: 150px;      /* Высота раскрытого окна */
    width: 150px;
}

/* ---------- Заголовок ---------- */
.operator-header {
    height: 30px;
    line-height: 30px;
    padding: 0 10px;
    cursor: pointer;
    font-weight: bold;
    background: #2175d9;
}

/* ---------- Тело окна ---------- */
.operator-body {
    padding: 8px;
    display: none;               /* Скрыто в свернутом состоянии */
    flex-direction: column;
    gap: 5px;
}

/* Тело показываем, когда открыто */
#operator-widget.open .operator-body {
    display: flex;
}

/* Текстовое поле */
#operator-message {
    width: 100%;
    box-sizing: border-box;
    resize: none;
    font-size: 13px;
    padding: 4px;
}

/* Кнопка отправки */
#operator-send {
    background: #28a745;
    border: none;
    color: #fff;
    padding: 5px 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}
#operator-send:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Статус отправки (сообщение об успехе/ошибке) */
.status {
    font-size: 12px;
    margin-top: 3px;
}
