* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 100%;
    background-image: url('/static/images/coffe.jpg');
    background-size: cover;
    background-repeat: no-repeat;

 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh; 
    margin: 0; 
}

#siguenos-text {
    font-size: 20px; 
    font-weight: bold;
    color: #ffffff; 
    text-align: center;
    text-transform: uppercase; 
    letter-spacing: 2px; 
    transform: translateZ(30px); 
    
}

*, html {
    --primaryGradient: linear-gradient(93.12deg, #581B98 0.52%, #9C1DE7 100%);
    --secondaryGradient: linear-gradient(268.91deg, #581B98 -2.14%, #9C1DE7 99.69%);
    --primaryBoxShadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    --secondaryBoxShadow: 0px -10px 15px rgba(0, 0, 0, 0.1);
    --primary: #581B98;
}


.chatbox {
    position: absolute;
    bottom: 30px;
    right: 30px;
}

.botText span {
    white-space: pre-line; 
}

.chat-message {
  white-space: pre-line; 
  line-height: 1.5;      
  margin-bottom: 1rem;   
  padding: 0.5rem 1rem;  
  background-color: #f3f3f3; 
  border-radius: 10px;        
}

.messages__item {
  white-space: pre-line; 
  line-height: 1.5;      
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
}

.messages__item--visitor {
  background-color: #d1e7dd;
  align-self: flex-end;
}

.messages__item--operator {
  background-color: #f3f3f3;
  align-self: flex-start;
}






.chatbox__support {
    display: flex;
    flex-direction: column;
    background: #eee;
    width: 300px;
    height: 350px;
    z-index: -123456;
    opacity: 0;
    transition: all .5s ease-in-out;
}

.chatbox--active {
    transform: translateY(-40px);
    z-index: 123456;
    opacity: 1;

}



.chatbox__button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
}

/* Ajuste de ícono dentro del botón */
.chatbox__button img {
    width: 32px;
    height: 32px;
}

.send__button {
    padding: 6px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}


.chatbox__header {
    position: sticky;
    top: 0;
    background: orange;
}


.chatbox__messages {
    margin-top: auto;
    display: flex;
    overflow-y: scroll;
    flex-direction: column-reverse;
}

.messages__item {
    background: orange;
    max-width: 60.6%;
    width: fit-content;
}

.messages__item--operator {
    margin-left: auto;
}

.messages__item--visitor {
    margin-right: auto;
}


.chatbox__footer {
    position: sticky;
    bottom: 0;
}

.chatbox__support {
    background: #f9f9f9;
    height: 450px;
    width: 350px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}


.chatbox__header {
    background: var(--primaryGradient);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: var(--primaryBoxShadow);
}

.chatbox__image--header {
    margin-right: 10px;
}

.chatbox__heading--header {
    font-size: 1.2rem;
    color: white;
}

.chatbox__description--header {
    font-size: .9rem;
    color: white;
}

.chatbox__messages {
    padding: 0 20px;
}

.messages__item {
    margin-top: 10px;
    background: #E0E0E0;
    padding: 8px 12px;
    max-width: 70%;
}

.messages__item--visitor,
.messages__item--typing {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.messages__item--operator {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
    background: var(--primary);
    color: white;
}


.chatbox__footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px;
    background: var(--secondaryGradient);
    box-shadow: var(--secondaryBoxShadow);
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    margin-top: 20px;
}

.chatbox__footer input {
    width: 80%;
    border: none;
    padding: 10px 10px;
    border-radius: 30px;
    text-align: left;
}

.chatbox__send--footer {
    color: white;
}

.chatbox__button button,
.chatbox__button button:focus,
.chatbox__button button:visited {
    padding: 10px;
    background: white;
    border: none;
    outline: none;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-bottom-left-radius: 50px;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}


/* 📱 Móviles (pantallas pequeñas) */
@media (max-width: 600px) {
    .chatbox__support {
        width: 80vw;     /* más compacto que 90% */
        height: 60vh;    /* ocupa menos altura */
        border-radius: 15px;
    }

    .chatbox__button {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }

    .chatbox__button img {
        width: 30px;
        height: 30px;
    }

    .chatbox__footer input {
        width: 70%;
        font-size: 14px;
        padding: 8px 10px;
    }

    .chatbox__send--footer {
        font-size: 14px;
    }

    .messages__item {
        max-width: 90%;
        font-size: 14px;
        padding: 6px 10px;
    }

    .chatbox__header {
        font-size: 1rem;
        padding: 10px 15px;
    }
}


/* 📱💻 Tablets (pantallas medianas) */
@media (min-width: 601px) and (max-width: 900px) {
    .chatbox__support {
        width: 70vw;
        height: 65vh;
    }

    .messages__item {
        max-width: 75%;
    }

    .chatbox__button {
        width: 60px;
        height: 60px;
    }
}


/* 💻 Desktop (pantallas grandes) */
@media (min-width: 901px) {
    .chatbox__support {
        width: 350px;  /* tamaño fijo más pro */
        height: 420px;
    }

    .messages__item {
        max-width: 70%;
    }

    .chatbox__button {
        width: 65px;
        height: 65px;
    }
}



