#chat-button {
    position: fixed;
    right: 26px;
    bottom: 130px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8d2de2, #702282);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    font-size: 34px;
    box-shadow: 0 12px 32px rgba(112,34,130,.38);
    transition: .25s ease;
}

#chat-button:hover {
    transform: scale(1.08);
}

#chat-window {
    position: fixed;
    right: 50px;
    bottom: 210px;
    width: 350px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.22);
    z-index: 9998;
    overflow: hidden;
    display: none;
    font-family: Arial, sans-serif;
}

.chat-header {
    background: #7b2cbf;
    color: #fff;
    padding: 14px;
    font-weight: bold;
}

#chat-messages {
    height: 260px;
    padding: 12px;
    overflow-y: auto;
    background: #f7f7f7;
}

.chat-msg {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    max-width: 85%;
    font-size: 14px;
}

.chat-msg.client {
    background: #e8d9ff;
    margin-left: auto;
}

.chat-msg.operator {
    background: #fff;
    border: 1px solid #ddd;
}

.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}

#chat-message-input {
    flex: 1;
    border: none;
    padding: 12px;
    outline: none;
}

#chat-send {
    border: none;
    background: #7b2cbf;
    color: #fff;
    padding: 0 14px;
    cursor: pointer;
}

.chat-start-form{
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:10px;
    background:#fff;
}

.chat-start-form input{
    padding:12px;
    border:1px solid #ddd;
    border-radius:8px;
    outline:none;
    font-size:14px;
}

#chat-start-btn{
    border:none;
    background:#7b2cbf;
    color:#fff;
    padding:12px;
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
}

.phone-wrap{
    display:flex;
    align-items:center;
    border:1px solid #ddd;
    border-radius:8px;
    padding:0 12px;
    background:#fff;
}

.phone-wrap span{
    font-size:14px;
    color:#333;
    margin-right:8px;
}

.phone-wrap input{
    border:none !important;
    padding:12px 0 !important;
    flex:1;
    outline:none;
}

.chat-header{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.operator-status{
    font-size:12px;
    font-weight:normal;
    display:flex;
    align-items:center;
    gap:6px;
}

.operator-status span{
    width:8px;
    height:8px;
    border-radius:50%;
    display:inline-block;
}

.operator-status.online span{
    background:#2ecc71;
}

.operator-status.offline span{
    background:#bbb;
}

.typing-indicator{
    padding:6px 12px;
    font-size:12px;
    color:#777;
    background:#f7f7f7;
    font-style:italic;
}

#chat-button svg{
    width:34px;
    height:34px;
    flex-shrink:0;
}

@media (max-width: 768px) {
    #chat-button {
        width: 64px;
        height: 64px;
        right: 18px;
        bottom: 86px;
        font-size: 30px;
    }

    #chat-window {
        right: 12px;
        bottom: 160px;
        width: calc(100vw - 24px);
        max-width: 350px;
    }
    
    #chat-button svg{
        width:30px;
        height:30px;
    }
}