#autobrn-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999999;
    font-family: Arial, sans-serif;
}

#autobrn-chat-launcher {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #ff6b00;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

#autobrn-chat-launcher.hidden {
    display: none;
}

#autobrn-chat-panel {
    width: 360px;
    height: 520px;
    max-height: calc(100vh - 40px);
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 55px rgba(0,0,0,.28);
}

#autobrn-chat-panel.active {
    display: flex;
}

.autobrn-chat-head {
    min-height: 72px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
}

.autobrn-chat-head strong {
    display: block;
    font-size: 18px;
}

.autobrn-chat-head span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: rgba(255,255,255,.7);
}

#autobrn-chat-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

#autobrn-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f5f6f8;
}

.autobrn-chat-welcome {
    background: #fff;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 12px;
}

.autobrn-chat-message {
    max-width: 82%;
    padding: 10px 13px;
    margin: 8px 0;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.autobrn-chat-message--client {
    margin-left: auto;
    background: #ff6b00;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.autobrn-chat-message--admin {
    margin-right: auto;
    background: #fff;
    color: #111827;
    border-bottom-left-radius: 4px;
}

#autobrn-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e6e7eb;
    background: #fff;
}

#autobrn-chat-input {
    flex: 1;
    resize: none;
    border: 1px solid #d7d9de;
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 42px;
    max-height: 100px;
    outline: none;
}

#autobrn-chat-form button {
    border: 0;
    border-radius: 12px;
    background: #ff6b00;
    color: #fff;
    font-weight: 700;
    padding: 0 15px;
    cursor: pointer;
}

@media (max-width: 600px) {
    #autobrn-chat-widget {
        right: 12px;
        bottom: 12px;
    }

    #autobrn-chat-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        height: min(560px, calc(100vh - 20px));
    }
}

.autobrn-chat-message--bot {
    margin-right: auto;
    background: #fff;
    color: #111827;
    border-bottom-left-radius: 4px;
    border: 1px solid #eceef1;
}

.autobrn-chat-sender {
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 800;
    opacity: .72;
}

