#ia-chat-form {
  display: flex;
  align-items: center;
  padding: 12px 10px 12px 10px;
  background: #fafdff;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  box-shadow: 0 -2px 8px #2980f111;
  gap: 8px;
  box-sizing: border-box;
}
#ia-chat-input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 16px;
  margin: 0 4px;
  outline: none;
  background: #f7f9fa;
  color: #222;
  box-shadow: 0 2px 8px #2980f111;
  transition: box-shadow 0.2s, background 0.2s;
}
#ia-chat-input:focus {
  background: #fff;
  box-shadow: 0 2px 12px #2980f122;
}
#ia-chat-form button[type="submit"] {
  background: linear-gradient(90deg, #2980f2 0%, #6dd5fa 100%);
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px #2980f111;
  transition: background 0.2s, box-shadow 0.2s;
  max-width: 110px;
  min-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ia-chat-form button[type="submit"]:hover {
  background: linear-gradient(90deg, #1861b7 0%, #6dd5fa 100%);
  box-shadow: 0 4px 16px #2980f122;
}
#ia-chat-image-btn {
  font-size: 22px;
  cursor: pointer;
  margin-right: 10px;
  color: #2980f2;
  background: #f7f9fa;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#ia-chat-image-btn:hover {
  background: #eaf1fb;
}
#ia-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Segoe UI', Arial, sans-serif;
}
#ia-chat-icon {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
#ia-chat-icon img {
  width: 80px;
  height: 80px;
}
#ia-chat-icon:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}
#ia-chat-window {
  width: 350px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s, height 0.2s;
}
#ia-chat-window.hidden {
  display: none;
}
#ia-chat-header {
  background: linear-gradient(90deg, #2980f2 0%, #1861b7 100%);
  color: #fff;
  padding: 14px 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
/* Mensaje general */
.ia-chat-msg {
  max-width: 95%;
  padding: 10px 14px 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Imagen dentro del mensaje */
.ia-chat-msg img {
  display: block;
  margin: 0 auto 10px auto;
  max-width: 140px;
  max-height: 140px;
  border-radius: 12px;
  box-shadow: 0 2px 8px #2980f233;
  background: #f7f9fa;
}

/* Texto debajo de la imagen */
.ia-chat-msg span {
  display: block;
  margin-top: 2px;
  text-align: left;
  word-break: break-word;
}
#ia-chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
#ia-chat-messages {
  flex: 1;
  padding: 8px 8px 4px 8px;
  overflow-y: auto;
  background: #f7f9fa;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ia-chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}
.ia-chat-msg.user {
  align-self: flex-end;
  background: #eaf1fb;
  color: #222;
  border-bottom-right-radius: 4px;
}
.ia-chat-msg {
  max-width: 95%;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
  margin-bottom: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

@media (max-width: 600px) {
  #ia-chat-window {
    width: 100vw !important;
    height: 100vh !important;
    bottom: 0;
    right: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #ia-chat-window {
    width: 350px;
    height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.2s, height 0.2s;
  }

  /* Panel de sugerencias IA: degradado azul */
  #ia-chat-suggestions {
    background: linear-gradient(120deg, #eaf1fb 0%, #c7e0fa 100%) !important;
    border: 2px solid #2980f2 !important;
  }
}
#ia-chat-input {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 15px;
  margin: 0 8px;
  outline: none;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
#ia-chat-form button {
  background: #2980f2;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
#ia-chat-form button:hover {
  background: #1861b7;
}
#ia-chat-image-btn {
  font-size: 20px;
  cursor: pointer;
  margin-right: 6px;
  color: #2980f2;
  transition: color 0.2s;
}
#ia-chat-image-btn:hover {
  color: #1861b7;
}
