/* Чат поддержки: плавающий кружок + всплывающая панель. */

.support-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    font-family: inherit;
}

/* --- Кнопка-кружок --- */
.support-chat__bubble {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.support-chat__bubble:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
}

.support-chat__bubble-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    pointer-events: none;
}

/* --- Значок непрочитанных --- */
.support-chat__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e53935;
    color: #ffffff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 0 0 2px #ffffff;
}

/* --- Панель --- */
.support-chat__panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.support-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ED8C33;
    color: #ffffff;
}

.support-chat__title {
    font-size: 15px;
    font-weight: 600;
}

.support-chat__close {
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

/* --- Сообщения --- */
.support-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f5f7fb;
}

.support-chat__hint {
    color: #8a93a6;
    font-size: 13px;
    text-align: center;
    margin: auto 0;
}

.support-chat__msg {
    max-width: 80%;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.35;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.support-chat__msg-time {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.6;
}

/* Сообщение посетителя — справа */
.support-chat__msg--visitor {
    align-self: flex-end;
    background: #ED8C33;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

/* Сообщение администрации — слева */
.support-chat__msg--admin {
    align-self: flex-start;
    background: #ffffff;
    color: #1f2532;
    border: 1px solid #e3e8f0;
    border-bottom-left-radius: 4px;
}

/* --- Поле ввода --- */
.support-chat__composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e8ecf3;
    background: #ffffff;
}

.support-chat__input {
    flex: 1;
    resize: none;
    border: 1px solid #d6dce8;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    max-height: 110px;
    outline: none;
}

.support-chat__input:focus {
    border-color: #ED8C33;
}

.support-chat__send {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ED8C33;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.support-chat__send:hover {
    background: #d4781f;
}

.support-chat__send:disabled {
    background: #f2c08c;
    cursor: default;
}

/* --- Мобильные --- */
@media (max-width: 480px) {
    .support-chat {
        right: 16px;
        bottom: 16px;
    }

    .support-chat__panel {
        width: calc(100vw - 32px);
        height: 70vh;
    }
}
