@charset "UTF-8";

@font-face {
  font-family: "Geist";
  src: url(../assets/fonts/Geist-Regular.ttf);
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Geist";
  src: url(../assets/fonts/Geist-Bold.ttf);
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Geist";
  src: url(../assets/fonts/Geist-Light.ttf);
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Geist";
  src: url(../assets/fonts/Geist-Medium.ttf);
  font-weight: 500;
  font-style: normal;
}

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

.content {
  display: flex;
}

.lateral {
  width: 15%;
  /* Ajusta el ancho de la barra lateral */
  height: 100vh;
  /* Altura del 100% del viewport */
  background-color: #f9fafb;
  color: black;
  display: flex;
  flex-direction: column;
  /* Para alinear los hijos verticalmente */
  justify-content: space-between;
  /* Distribuye el espacio entre los hijs */
  border-right: 1px solid #f6f6f6;
}

.lateral #presentacion {
  padding-top: 10px;
}

.lateral #presentacion img {
  padding-left: 10px;
  width: 60px;
  height: 50px;
  float: left;
}

.lateral #presentacion a {
  text-decoration: none;
  color: black;
}

.lateral #presentacion h1 {
  font-family: "Geist";
  font-size: 40px;
  padding-left: 60px;
}

.lateral h2 {
  font-family: "Geist";
  display: block;
  padding: 30px;
  padding-left: 20px;
  font-size: 23px;
  text-align: left;
}

.lateral #chats {
  padding-left: 20px;
  flex-grow: 1;
}

.lateral #chats ul {
  padding-top: 10px;
  margin-left: 0;
  list-style: none;
}

.lateral #chats ul img {
  position: absolute;
  width: 30px;
  height: 35px;
  padding-top: 10px;
  padding-left: 10px;
  padding-bottom: 5px;
}

.lateral #chats ul li {
  font-family: "Geist";
  font-weight: bold;
  text-align: left;
  margin-right: 20px;
  margin-bottom: 10px;
  padding: 10px;
  padding-left: 40px;
  font-size: 15px;
  border-radius: 5px;
  transition: all 200ms;
}

.lateral #chats ul li .accion-btn {
  color: black;
  font-family: "Geist";
  font-weight: normal;
  font-size: 15px;
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  /* Align text to the left */
  cursor: pointer;
}

.lateral #chats ul li:hover {
  background-color: #dbdbe7;
  cursor: pointer;
}

.lateral #credits {
  margin: 0 auto;
  width: 85%;
  padding-bottom: 25px;
}

.lateral #credits h4 {
  font-family: "Geist";
  font-weight: normal;
  font-size: 13px;
  text-align: left;
  line-height: 0px;
  color: rgb(61, 57, 57);
}

.board {
  width: 85%;
  /* Ajusta el ancho del board */
  height: 100vh;
  /* Altura del 100% del viewport */
  background-color: #ffffff;
  /* Color de fondo para el board */
  display: flex;
  flex-direction: column;
}

.board #titular {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
  border-bottom: 1px solid #f6f6f6;
  flex: 0 0 auto;
}

.board #titular h2 {
  font-family: "Geist";
  font-size: 30px;
  margin-left: 20px;
  line-height: 90px;
}

.board #titular #logos #logoutp {
  padding-bottom: 7px;
  padding-right: 30px;
  width: 130px;
  height: 70px;
}

.board #titular #logos #logomecatronica {
  padding-right: 10px;
  width: 120px;
  height: 80px;
}

.board #chat {
  flex: 1 1 auto;
  max-width: 100%;
  flex-direction: column;
  overflow: hidden;
  overflow-y: auto;
}

.board #chat::-webkit-scrollbar {
  width: 12px;
}

.board #chat::-webkit-scrollbar-track {
  background: #185046;
  border-radius: 10px;
}

.board #chat::-webkit-scrollbar-thumb {
  background: #2a9480;
  border-radius: 10px;
}

.board #chat::-webkit-scrollbar-thumb:hover {
  background: #5f8a82;
}

.board #chat .robot {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  position: relative;
  max-width: 100%;
}

.board #chat .robot #imagenderobot {
  position: absolute;
  float: left;
  border-radius: 50px;
  background-color: #dee1e5;
  margin-top: 25px;
  margin-left: 15px;
  width: 45px;
  height: 45px;
}

.board #chat .robot #imagenderobot #iconoderobot {
  margin-top: 6px;
  margin-left: 6px;
  width: 33px;
  height: 33px;
}

.board #chat .robot #cuadrodetexto {
  flex-shrink: 1;
  flex-grow: 0;
  flex-basis: auto;
  max-width: 35%;
  height: auto;
  margin-top: 20px;
  margin-left: 70px;
  border-radius: 10px;
  padding: 10px;
  background-color: #f3f4f6;
  box-shadow: 1px 3px 3px #d6cdcd;
  word-wrap: break-word;
  white-space: normal;
  overflow: hidden;
  overflow-y: auto;
}

.board #chat .robot #cuadrodetexto h2 {
  font-weight: lighter;
  line-height: 1.3;
  font-family: "Geist";
  font-size: 15px;
  color: black;
  margin: 10px auto;
  text-align: justify;
}

.board #chat .humano {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.board #chat .humano #cuadrodetexto {
  width: auto;
  max-width: 50%;
  word-wrap: break-word;
  height: auto;
  margin: 5px 10px 20px 0;
  border-radius: 10px;
  padding-left: 10px;
  background-color: #185046;
  box-shadow: 1px 3px 3px #d6cdcd;
  overflow: visible;
}

.board #chat .humano #cuadrodetexto h2 {
  font-weight: lighter;
  line-height: 1.2;
  font-family: "Geist";
  font-size: 15px;
  color: white;
  padding-right: 20px;
  padding-left: 10px;
  margin: 15px auto;
}

.board #chat .humano #imagendehumano {
  align-self: flex-start;
  position: relative;
  width: 45px;
  height: 45px;
  margin-top: 5px;
  margin-right: 15px;
  border-radius: 50px;
  background-color: #185046;
}

.board #chat .humano #imagendehumano #iconodehumano {
  margin-top: 7px;
  margin-left: 7px;
  width: 30px;
  height: 30px;
}

.board #campo-de-texto {
  min-height: 65px;
  border-top: 1px solid #f6f6f6;
  flex: 0 0 auto;
}

.board #campo-de-texto form {
  margin-left: 15px;
}

.board #campo-de-texto form #divInput {
  float: left;
  width: 95%;
}

.board #campo-de-texto form #divInput input[type=text] {
  border: none;
  background-color: #f3f4f6;
  border-radius: 5px;
  padding-left: 15px;
  margin-top: 10px;
  width: 100%;
  height: 45px;
  font-family: "Geist";
}

.board #campo-de-texto form #divButton {
  float: right;
  width: 5%;
}

.board #campo-de-texto form #divButton button {
  margin-top: 11px;
  margin-left: 7px;
  width: 50px;
  height: 40px;
  border: none;
  border-radius: 20px;
  box-shadow: 1px 3px 3px #d6cdcd;
  background-color: #185046;
  color: white;
  font-family: "Geist";
  font-size: 5px;
  cursor: pointer;
  transition: all 300ms;
}

.board #campo-de-texto form #divButton button #iconoEnviar {
  width: 20px;
  height: 20px;
}

.board #campo-de-texto form #divButton button:hover {
  background-color: #0a241f;
  /* Color al pasar el mouse */
}

.board #campo-de-texto form #divButton button:disabled {
  background-color: #000000;
  color: #d6cdcd;
  cursor: not-allowed;
}

/* Responsive Design */

@media (max-width: 1024px) {
  .lateral {
    width: 25%;
  }

  .board {
    width: 75%;
  }
}

@media (max-width: 768px) {
  .content {
    flex-direction: column;
  }

  /* Mobile Sidebar (Off-canvas) */
  .lateral {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    /* Fixed width for sidebar */
    height: 100vh;
    z-index: 1000;
    background-color: #f9fafb;
    transform: translateX(-100%);
    /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .lateral.active {
    transform: translateX(0);
    /* Slide in */
  }

  /* Close button for sidebar */
  #close-sidebar {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    display: block;
  }

  /* Mobile Overlay */
  #mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  #mobile-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Restore sidebar elements for mobile menu */
  .lateral h2,
  .lateral #chats,
  .lateral #credits {
    display: block;
  }

  .lateral #presentacion {
    padding-top: 0;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .lateral #presentacion img {
    padding-left: 0;
    width: 40px;
    height: 40px;
  }

  .lateral #presentacion h1 {
    padding-left: 15px;
    font-size: 24px;
    margin: 0;
  }

  /* Main Board */
  .board {
    width: 100%;
    height: 100vh;
  }

  /* Header */
  .board #titular {
    min-height: 60px;
    padding: 0 15px;
    justify-content: space-between;
  }

  .board #titular h2 {
    font-size: 18px;
    line-height: 60px;
    margin-left: 10px;
    display: block;
    /* Ensure title is visible */
  }

  /* Hamburger Menu Button */
  #hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .board #titular #logos {
    display: flex;
    align-items: center;
  }

  .board #titular #logos #logoutp {
    width: 50px;
    height: auto;
    padding-right: 10px;
    padding-bottom: 0;
  }

  .board #titular #logos #logomecatronica {
    width: 50px;
    height: auto;
    padding-right: 0;
  }

  /* Chat Area */
  .board #chat {
    /* Height handled by flexbox */
    padding: 10px;
  }

  /* Chat Bubbles - Premium Look */
  .board #chat .robot #cuadrodetexto,
  .board #chat .humano #cuadrodetexto {
    max-width: 85%;
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
  }

  .board #chat .robot #cuadrodetexto {
    margin-left: 55px;
    /* Space for avatar */
    margin-top: 5px;
    background-color: #f3f4f6;
    border-top-left-radius: 4px;
  }

  .board #chat .humano #cuadrodetexto {
    margin-right: 55px;
    /* Space for avatar */
    background-color: #185046;
    color: white;
    border-top-right-radius: 4px;
  }

  .board #chat .robot #cuadrodetexto h2,
  .board #chat .humano #cuadrodetexto h2 {
    font-size: 14px;
    /* Slightly smaller for mobile */
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

  /* Avatars */
  .board #chat .robot #imagenderobot,
  .board #chat .humano #imagendehumano {
    width: 32px;
    height: 32px;
    margin-top: 5px;
  }

  .board #chat .robot #imagenderobot {
    margin-left: 10px;
  }

  .board #chat .humano #imagendehumano {
    margin-right: 10px;
  }

  .board #chat .robot #imagenderobot #iconoderobot,
  .board #chat .humano #imagendehumano #iconodehumano {
    width: 20px;
    height: 20px;
    margin: 6px;
  }

  /* Input Area */
  .board #campo-de-texto {
    padding: 10px 15px;
    background-color: #fff;
  }

  .board #campo-de-texto form {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .board #campo-de-texto form #divInput {
    float: none;
    width: auto;
    flex-grow: 1;
  }

  .board #campo-de-texto form #divInput input[type=text] {
    width: 100%;
    margin-top: 0;
    font-size: 16px;
    /* Prevent zoom on iOS */
    height: 44px;
    /* Touch friendly */
    padding-left: 15px;
    border-radius: 22px;
    /* Pill shape */
  }

  .board #campo-de-texto form #divButton {
    float: none;
    width: auto;
    margin: 0;
  }

  .board #campo-de-texto form #divButton button {
    margin: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .board #campo-de-texto form #divButton button #iconoEnviar {
    width: 20px;
    height: 20px;
  }
}

/* Utility classes for mobile visibility */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
}

@keyframes loading {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.loading-rectangle {
  position: relative;
  width: 60px;
  height: 20px;
  background-color: #f3f4f6;
  overflow: hidden;
}

.loading-rectangle::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #185046, transparent);
  animation: loading 2s linear infinite;
}