.rocket-chat {
  width: 100%;
  padding: 60px 20px 24px;
  background: #fff;
  color: #242424;
  font-family: inherit;
  text-align: center;
}

.rocket-chat,
.rocket-chat * {
  box-sizing: border-box;
}

.rocket-chat-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 620px;
  min-height: 230px;
  margin: 0 auto;
}

.rocket-chat-box {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 52px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e3e6;
  border-radius: 26px;
  text-align: left;
  box-shadow: 0 12px 36px rgb(21 32 43 / 4%);

  transition:
    max-width 0.6s cubic-bezier(.175, .885, .32, 1.275),
    height 0.6s cubic-bezier(.175, .885, .32, 1.275),
    border-color 0.4s,
    box-shadow 0.4s;
}

/* Barra expandida */
.rocket-chat.is-expanded .rocket-chat-box {
  max-width: 510px;
  height: 156px;
  border-color: #d3e6ef;
  box-shadow: 0 20px 55px rgb(0 142 204 / 6%);
}

.rocket-chat-placeholder {
  position: absolute;
  top: 15px;
  right: 52px;
  left: 19px;
  color: #797e84;
  font-size: 14px;
  line-height: 22px;
  white-space: nowrap;

  transition:
    opacity 0.25s,
    transform 0.4s;
}

.rocket-chat.is-expanded .rocket-chat-placeholder {
  opacity: 0;
  transform: translateY(-7px);
}

/* Texto que se escribe */
.rocket-chat-writing {
  position: absolute;
  top: 20px;
  right: 24px;
  left: 21px;
  opacity: 0;
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
  transform: translateY(7px);

  transition:
    opacity 0.3s,
    transform 0.4s;
}

.rocket-chat.is-expanded .rocket-chat-writing {
  opacity: 1;
  transform: translateY(0);
}

.rocket-chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: #7455ff;
  vertical-align: -2px;
  animation: rocket-chat-blink 1s steps(1) infinite;
}

/* Herramientas inferiores */
.rocket-chat-tools {
  position: absolute;
  right: 59px;
  bottom: 13px;
  left: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity 0.3s,
    transform 0.4s;
}

.rocket-chat.is-expanded .rocket-chat-tools {
  opacity: 1;
  transform: translateY(0);
}

.rocket-chat-model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #747980;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.rocket-chat-plus {
  margin-left: auto;
  color: #767b81;
  font-size: 24px;
  line-height: 1;
}

/* Icono circular */
.rocket-chat-action {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: #242424;
  border-radius: 50%;
  transition: background 0.4s, color 0.4s;
}

.rocket-chat-action svg {
  position: absolute;
  width: 17px;
  height: 17px;

  transition:
    opacity 0.3s,
    transform 0.4s;
}

.rocket-chat-arrow {
  opacity: 0;
  transform: rotate(-45deg) scale(.5);
}

.rocket-chat.has-text .rocket-chat-action {
  color: #08232f;
  background: #00b1ff;
}

.rocket-chat.has-text .rocket-chat-arrow {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.rocket-chat.has-text .rocket-chat-mic {
  opacity: 0;
  transform: rotate(45deg) scale(.5);
}

/* Control de animación */
.rocket-chat-pause {
  padding: 8px;
  border: 0;
  background: transparent;
  color: #717780;
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.rocket-chat-pause:focus-visible {
  outline: 2px solid #007caf;
  outline-offset: 3px;
}

.rocket-chat.is-paused .rocket-chat-cursor {
  animation-play-state: paused;
}

@keyframes rocket-chat-blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .rocket-chat {
    padding: 35px 16px 16px;
  }

  .rocket-chat-stage {
    min-height: 220px;
  }

  .rocket-chat.is-expanded .rocket-chat-box {
    height: 170px;
  }

  .rocket-chat-writing {
    font-size: 15px;
  }

  .rocket-chat-model {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rocket-chat * {
    transition: none !important;
    animation: none !important;
  }

  .rocket-chat-cursor {
    display: none;
  }
}