:root {
    --color-inmomatik-primary: #e7edea;
    --color-inmomatik-secondary: #35b0f2;
    --color-inmomatik-third: #F6F8F7;
    --color-inmomatik-text: #FFF;
    --color-inmomatik-dialog: #DDD;
    --color-inmomatik-white: #FFF;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #fff;
}

#chat-icon {
    display: inline-block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

#chat-icon.fade-out {
    transform: rotate(180deg);
    opacity: 0;
}

#chat-icon.fade-in {
    transform: rotate(0deg);
    opacity: 1;
}

#chatbox {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 420px;
    max-height: 800px;
    overflow: hidden;
    z-index: 998;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-bottom-width: 1px;
    border-color: rgba(156, 166, 161, 0.4);
    border-left-width: 1px;
    border-right-width: 1px;
    border-style: solid;
    border-top-width: 1px;
    will-change: transform;
    border-radius: 40px;
    box-shadow: rgba(24, 37, 28, 0.1) 0px 5px 20px 0px;
}

#chatbox.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#chatbox header {
    border-bottom-width: 1px;
    border-color: rgb(230, 242, 235);
    border-left-width: 0px;
    border-right-width: 0px;
    border-style: solid;
    border-top-width: 0px;
    opacity: 1;
    height: 80px;
    background: #FFF;
    display: flex;
}

#chatbox header > svg {
    width: 206px;
    margin-top: 22px;
    margin-left: 34px;
}

#chatbox header h1 {
    margin: 0px;
}

#chatbox header p {
    font-size:13px;
    font-weight: normal;
    margin-bottom: 0px;
}

#chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: var(--color-inmomatik-white);
    min-height: 450px;
    max-height: 550px;
}

.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    max-width: 80%;
}

.message.user {
    background-color: var(--color-inmomatik-secondary);
    color: #333;
    align-self: flex-end;
    border-radius: 30px;
    margin-left: 56px;
    font-size: 15px;
    padding: 17px 20px;
    font-weight: 500;
}

.message.bot {
    background-color: var(--color-inmomatik-third);
    align-self: flex-start;
    border-radius: 30px;
    font-size: 15px;
    padding: 17px 20px;
    color: #333;
    font-weight: 500;
}

#chat-form {
    display: flex;
    height: 98px;
    background: #FFF;
}

#chat-input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    height: 46px;
    margin: 14px 0px 0px 14px;
    border-bottom-width: 1px;
    border-color: rgb(220, 232, 225);
    border-left-width: 1px;
    border-right-width: 1px;
    border-style: solid;
    border-top-width: 1px;
    background-color: rgb(245, 248, 246);
    width: 100%;
    border-radius: 24px;
    opacity: 1;
}

#chat-send {
    background-color: var(--color-inmomatik-white);
    color: var(--color-inmomatik-primary);
    border: none;
    padding: 10px;
    cursor: pointer;
    width: 50px;
    font-size: 30px;
}

@media (max-width: 768px) {
    #chatbox {
    width: 100vw;
    height: 100%;
    max-height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
    }

    #chat-messages {
        min-height: calc(100% - 198px); /* Altura dinámica */
    }

    .message.user,
    .message.bot {
    max-width: 90%;
    }
}

.im-chatbot-button {
    bottom: 25px;
    position: fixed;
    right: 25px;
    background: rgb(48, 183, 107);
    width: 60px;
    height: 60px;
    box-shadow: 0px 3px 20px -7px rgb(33, 158, 87);
    border-color: rgba(33, 158, 87, 0.6);
    border-radius: 20px;
}

.im-chatbot-button:hover {
    background: rgb(33, 158, 87);
    cursor: pointer;
}

#chat-icon > svg {
    width: 32px; 
    padding: 13px 14px;
}

#chat-shadow {
    position:absolute;
    width: 100%;
    height:20px;
    bottom: 98px;
    background: linear-gradient(rgba(24, 37, 28, 0) 0%, rgba(24, 37, 28, 0.05) 100%);
    opacity: 1;
    font-size: 11px;
    text-align: end;
    color: #999;
}

#chat-shadow a { 
    color: rgb(48, 183, 107);
    text-decoration: none;
}

#chat-shadow span { 
    margin-right: 7px;
    line-height: 19px;
}

.im-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50px;
    margin-left: 24px;
    margin-top: 15px;
}

.im-avatar-name {
    font-size: 18px;
    font-weight: bold;
    padding-left: 10px;
    padding-top: 22px;
}

.im-avatar-name small {
    font-weight: 100;
    color: #666;
}

#im-closer {
    position: absolute;
    top: 16px;
    right: 19px;
    text-decoration: none;
    width: 22px;
}