:root {
    --kmx-primary: #c60a00;
    --kmx-secondary: #e5e5e5;
    --kmx-text-bot: #FFFFFF;
    --kmx-text-user: #444;
}
#chat-button {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 200px;
    height: 40px;
    background: var(--kmx-primary);
    color: #fff;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 0 8px;
    cursor: pointer;
    z-index: 99999;
}
#chat-button svg{
    padding: 5px;
}
#chat-panel{
    position:fixed;
    right: 16px;
    bottom: 16px;
    width: 320px;
    height: 45%;
    max-height: 70vh;
    background: #fff;
    border: 1px 1px 1px 1px solid #f4f4f5;
    border-top: 3px solid var(--kmx-primary);
    border-radius: 5px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    display:none;
    /* display: flex; */
    flex-direction: column;
    z-index: 99999;
}

#chat-header{
    background: #fff;
    border-radius: 5px 5px 0px 0px;
    border-bottom: 1px solid #f4f4f5;
    color: #444;
    padding: 6px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header button{
    background: trasparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

#chat-close {
    color: #97a0b3 !important; 
    background: none;
    border: none; 
    cursor: pointer;
    padding-right: 10px;;
}

#chat-close:hover {
    color: black !important; 
}

#chat-body{
    padding: 5px;
    overflow-y: auto;
    flex: 1;
}

.hidden{
    display: none;
}

.chat-window{
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kmx-messages{
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

 .kmx-mesage{
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
} 

 .chat-avatar{
    width: 36px;
    height: 36px;
    border-radius: 50%;
    
} 

.kmx-message.user .kmx-avatar{
    display: none;
}

 .kmx-message-content {
    font-size: 12px;
    background: var(--kmx-primary);
    border-radius: 15px;
    border-top-left-radius: 0;
    padding: 8px 12px;
    width: fit-content;
    /* min-width: 60px; */
    max-width: 80%;
    position: relative;
    color: var(--kmx-text-bot);
} 

 .kmx-message.user .kmx-message-content {
    border-top-right-radius: 0;
    border-top-left-radius: 10px;
    background: var(--kmx-secondary);
    margin-left: auto;
    margin-right: 0;
    color: var(--kmx-text-user);
} 

 .kmx-meta{
    font-size: 10px;
    color: #888;
    margin-top: 20px;
} 

.kmx-message.user .kmx-meta {
    text-align: right;
}


.kmx-separator {
    width: 103.1%;
    height: 1px;
    background: #f4f4f5;
    margin-left: -5px;
    margin-bottom: 10px;
    display: block;
}


.chat-input-area {
    display: flex;
    height: 43px ;
    border: 1px solid #ced4da;
    border-radius: 6px;
    overflow: hidden; 
    box-sizing: border-box;

}

#chat-input{
    flex: 1;
    border: none;          /* el borde vive en el contenedor */
    padding: 0 10px;
    outline: none;

    font-size: 14px;
    color: #444;

    height: 100%;
    box-sizing: border-box;

    border-radius: 0;      
}

#chat-send {
    all: unset; /* 💣 mata WordPress */
    background: var(--kmx-primary);
    color: #fff;

    padding: 0 16px;
    height: 100%;

    font-size: 14px;
    font-weight: 600;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    box-sizing: border-box;


}
#chat-input {
    border-radius: 6px 0 0 6px;
}

#chat-send {
    border-radius: 0 6px 6px 0;
}

#chat-send,
#chat-send.button,
#chat-send.ast-button {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
}
/* #chat-send,
#chat-input {
    height: 100%;
} */

/* Typing */
.kmx-typing{
    padding: 2px 0px;
}

.kmx-typing.hidden{
    display: none;
}

/*? Avatar + punto verde */
.kmx-avatar-wrapper.small {
    position: relative;
    width: 30px;
    height: 30px;
}
.kmx-avatar-wrapper {
    position: relative;
    width: 36px;
    height: 36px;

    width: fit-content;
    line-height: 0;        /* MUY importante en WP */
    box-sizing: content-box;

}

.chatbot-button {
    margin-top: 1px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

/* *Punto verde online */
.kmx-online-dot.small {
    /* position: absolute;
    right: -1px;
    bottom: 0px;
    width: 8px;
    height: 8px;
    background: #2ee06d;
    border-radius: 50%;
    border: 2px solid white; */
    position: absolute;
    right: 0;
    bottom: 0;

    width: 8px;
    height: 8px;

    background: #2ee06d;
    border-radius: 50%;
    border: 2px solid #fff;

    box-sizing: content-box;

}
.kmx-online-dot {
    position: absolute;
    right: -2px;
    bottom: -4px;
    width: 10px;
    height: 10px;
    background: #2ee06d;
    border-radius: 50%;
    border: 2px solid white;
}

/* Info del header */
.kmx-header-left {
    display: flex;
    align-items: center;
}

.kmx-header-info {
    margin-left: 8px;
    line-height: 1.1;
}

.kmx-bot-name {
    font-weight: bold;
    font-size: 14px;
}

.kmx-bot-status {
    font-size: 12px;
    opacity: 0.9;
}

/* Botón colapsado */
.kmx-chat-button {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.kmx-status-text {
    font-size: 13px;
    font-weight: 600;
}

