.chat-float-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0084ff;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1000;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 600px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);

    &.fullscreen {
        top: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .chat-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        background-color: #0084ff;
        color: white;
        border-bottom: 1px solid #ccc;

        h3 {
            margin: 0;
            color: white;
            text-align: center;
        }

        .header-buttons {
            display: flex;
            button{
                padding-right:20px;
            }
        }

        .header-button {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 14px;
            padding: 5px;
            color: white;
        }
    }

    .side-panel {
        position: absolute;
        right: 0;
        top: 44px;
        bottom: 0;
        width: 300px;
        overflow-y: auto;
        border-left: 1px solid #ccc;
        padding: 10px;
        background-color: #fafafa;
        z-index: 1001;

        .reset-button {
            width: 100%;
            padding: 8px;
            margin-bottom: 15px;
            background-color: #f44336;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .voice-setting {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 10px 0;

            span { 
                width: fit-content;
            }

            input[type="range"] {
                width: 100%;
            }
        }

        .voice-select {
            width: 100%;
            padding: 8px;
            margin: 5px 0;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
 

        .checkbox-label {
            display: flex;
            gap: 8px;
            margin: 1rem 2px;
            justify-content: space-between;
            flex-direction: row;
            align-items: center;
            input[type="checkbox"] {
                margin: 0;
                width: fit-content;
            }
        } 

        h4 {
            margin: 15px 0 10px 0;
        }
    }

    .chat-box {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;

        .messages-container {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
            background-color: #f9f9f9;
        }
    }

    .message-wrapper {
        margin: 8px 0;
        display: flex;
        align-items: flex-start;
        width: 100%;
         
        &.user {
            justify-content: flex-end;
            
             
            .message-bubble { 
                background-color: #0084ff;
                color: white;
                border-radius: 18px 18px 4px 18px;
                box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
                margin-right: 4px;
            }
        }

        &.assistant {
            .message-bubble {
                background-color: white;
                color: black;
                border-radius: 18px 18px 18px 4px;
                box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
                margin-left: 4px;
            }
        }

        .message-content {
            display: flex;
            align-items: flex-start; 
            gap: 8px;
        }

        .message-bubble {
            max-width: 75%;
            width: fit-content;
            padding: 12px 16px;
            min-width: 80px;
            word-wrap: break-word;
        }

        .speak-button {
            background: none;
            border: none;
            padding: 4px 10px;
            border-radius: 50%;
            cursor: pointer;
            opacity: 0.6;
            transition: opacity 0.2s ease;
            width: fit-content;
             
            &:hover {
                opacity: 0.8;
            }

            &.speaking {
                opacity: 1;
                background-color: rgba(0, 0, 0, 0.05);
            }
        }
    }

    .premade-messages {
        padding: 10px;
        text-align: center;
        background: #fffbe6;

        .premade-button {
            margin: 5px;
            padding: 8px 12px;
            cursor: pointer;
        }
    }

    .chat-form {
        display: flex;
        border-top: 1px solid #ccc;
        padding: 10px;
        position: relative;

        .mic-button {
            position: absolute;
            right: 10px;
            top: -40px;
            border: none;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            background: #0084ff;

            &.listening {
                background: #ff4444;
            }
        }

        .chat-input {
            flex: 1;
            border: 1px solid #ccc;
            border-radius: 5px;
            padding: 10px;
            font-size: 14px;
        }

        .send-button {
            margin-left: 10px;
            padding: 10px 15px;
            background-color: #0084ff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        .send-button:hover {
            background-color: #005bb5;
        }
    }
}

.no-scroll {
    overflow: hidden;
}
