/* Chat Widget Styles - полный экран на мобильных */
#chat-widget-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#chat-button {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

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

/* На десктопах окно появляется справа от кнопки */
@media (min-width: 769px) {
    #chat-window {
        position: absolute;
        bottom: 70px;
        right: 0;
        width: 380px;
        height: 550px;
        border-radius: 12px;
        box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    }
}

/* На мобильных устройствах — полноэкранный режим */
@media (max-width: 768px) {
    #chat-widget-root {
        bottom: 15px;
        right: 15px;
    }
    
    #chat-button {
        width: 55px;
        height: 55px;
    }
    
    #chat-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
}

/* Стили для сообщений */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    #chat-window {
        background: #1a1a1a;
    }
    #chat-messages {
        background: #2c2c2c;
    }
    .message.user .message-content {
        background: #2e7d32;
        color: #fff;
    }
    .message.admin .message-content {
        background: #3c3c3c;
        color: #fff;
    }
    #chat-input {
        background: #3c3c3c;
        border-color: #555;
        color: #fff;
    }
    #chat-input::placeholder {
        color: #aaa;
    }
    #chat-password-form {
        background: #4a4a4a;
    }
    #chat-header {
        background: #0a5a44;
    }
}
