body, html {
  scroll-behavior: smooth;
}

.tbk-ca-container * {
  transition: all 0.2s ease-out;
}

.tbk-ca-container {
  border: 1px solid #C9D0E4;
  margin-top: 50px;
  padding: 30px 30px 20px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.tbk-ca-content {
  position: relative;
  z-index: 2;
}

/* Animaciones */
@keyframes wave-inf {
  0% {
    left: -100%;
    opacity: 0.5;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    left: 100%;
    opacity: 0.5;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

@keyframes fadeOutCursor {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Loading screen */
.tbk-ca-loading-screen {
  display: none;
  background: #F9FBFE;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  border-radius: 15px;
  animation: fadeIn 0.3s ease;
}

.tbk-ca-wave-loading {
  position: absolute;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, #FBE5EC 20%, #FBE5EC 50%, #FBE5EC 80%, transparent 100%);
  opacity: 0.7;
  animation: wave-inf 1.8s ease-in-out infinite;
  z-index: 1;
}

.tbk-ca-loading-content {
  position: relative;
  z-index: 3;
  padding: 30px;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
}

.tbk-ca-loading-text {
  text-align: left;
  margin-top: 0;
}

.tbk-ca-ai-label {
  color: #030047;
}

.tbk-ca-loading-dots {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Inputs */
.tbk-ca-input-container, .tbk-ca-bottom-search {
  position: relative;
  display: grid;
  align-items: center;
  height: max-content;
  border-radius: 30px;
  padding: 14px 0px 10px 40px !important;
  border: 1px solid #E5397F !important;
  transition: all 0.3s ease;
}

textarea.tbk-ca-input {
  width: 76%;
  border: 0;
  background: #F9FBFE;
  resize: none;
  outline: none !important;
  field-sizing: content;
  transition: all 0.2s ease;
}

textarea#bottom-input {
  width: 91%;
  background: white;
}

.tbk-ca-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #e91e63;
  z-index: 2;
}

.tbk-ca-btn {
  background: #e91e63;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.tbk-ca-btn,
.tbk-btn {
  transition: all 0.2s ease-out !important;
}

.tbk-ca-btn:hover:not(:disabled),
.tbk-btn:hover {
  transform: translateY(-50%) scale(1.02);
  transition: all 0.15s ease-out !important;
}

.tbk-ca-btn:hover:not(:disabled) {
  color: white;
  transform: translateY(-50%) scale(1.02);
}

.tbk-ca-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.tbk-ca-example {
  display: inline-flex;
  align-items: center;
  background: #E7EBF3;
  border-radius: 17px;
  color: #2D3338;
  height: 23px;
  padding: 7px 11px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tbk-ca-example:hover {
  background: #e4e6eb;
  transform: translateY(-2px);
}

.tbk-ca-example:hover,
.tbk-ca-related-q:hover {
  transform: translateY(-2px);
  transition: all 0.15s ease-out !important; /* A?n m?s r?pido en hover */
}

.tbk-ca-example,
.tbk-ca-related-q {
  transition: all 0.2s ease-out !important;
}

.tbk-ca-title {
  margin-bottom: 10px;
  color: #030047;
}

.tbk-ca-subtitle {
  margin-bottom: 25px;
}

.tbk-ca-ai-img {
  width: 100%;
  height: 264px;
  object-fit: contain;
  max-width: 297.908px;
  animation: float 6s ease-in-out infinite;
}

img.img-sin-respuesta {
  width: 200px;
  height: 200px;
}

.tbk-ca-explore-more {
  display: inline-flex;
  align-items: center;
  margin-top: 40px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.tbk-ca-explore-more:hover {
  text-decoration: none;
  color: #0b7dda;
}

.tbk-ca-explore-more i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.tbk-ca-explore-more:hover i {
  transform: translateY(2px);
}

/* Results */
.tbk-ca-result {
  display: none;
  margin-top: 20px;
  animation: slideInUp 0.6s ease-out;
}

.tbk-ca-chat {
  margin-bottom: 30px;
}

.tbk-ca-query-bubble {
  display: inline-flex;
  background: #E7EBF3;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 16px;
  height: max-content;
  margin-bottom: 20px;
  float: right;
  clear: both;
  max-width: 80%;
  animation: slideInUp 0.3s ease-out;
}

button#bottom-btn {
  width: 72px !important;
  height: 40px !important;
  border-radius: 24px !important;
}

.tbk-ca-response {
  clear: both;
  margin-top: 10px;
  animation: slideInUp 0.35s ease-out 0.1s both;
  transition: all 0.3s ease;
}

.tbk-ca-steps {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.circulo-number {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #EBF6FF;
  flex-shrink: 0;
  fill: #EBF6FF;
  mix-blend-mode: multiply;
}

#steps p {
  animation: fadeIn 0.25s ease-out forwards;
}

#steps p:nth-child(1) {
  animation-delay: 0.05s;
}

#steps p:nth-child(2) {
  animation-delay: 0.1s;
}

#steps p:nth-child(3) {
  animation-delay: 0.15s;
}

#steps p:nth-child(4) {
  animation-delay: 0.2s;
}

#steps p:nth-child(5) {
  animation-delay: 0.25s;
}

.tbk-ca-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #eaeaea;
  font-size: 14px;
  animation: slideInUp 0.4s ease-out 0.2s both;
}

.tbk-ca-source {
  color: #2D3338;
}

.tbk-ca-source a {
  color: #007EFF;
  text-decoration: none;
}

.tbk-ca-share {
  display: flex;
  align-items: center;
}

.tbk-ca-share-text {
  margin-right: 10px;
  color: #707382;
}

.tbk-ca-share-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #D5006C;
  margin-left: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tbk-ca-share-btn:hover {
  transform: scale(1.1);
}

.tbk-ca-related {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  animation: slideInUp 0.45s ease-out 0.3s both;
}

.tbk-ca-related-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  height: 38px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #007EFF;
  border: 1px solid #C9D0E4;
}

.gap-10 {
  gap: 10px;
}

.tbk-ca-related-q:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
}

.tbk-ca-bottom-search {
  margin-top: 30px;
  position: relative;
  background: white;
  animation: slideInUp 0.5s ease-out 0.4s both;
}

.tbk-ca-bottom-search .tbk-ca-input {
  padding-left: 10px;
}

.tbk-ca-bottom-search .tbk-ca-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #e91e63;
  z-index: 2;
}

.tbk-ca-bottom-search .tbk-ca-btn {
  right: 7px;
  top: 6px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: none;
}

.tbk-ca-bottom-search .tbk-ca-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.tbk-ca-shake {
  animation: shake 0.5s ease-in-out;
}

.contenedor-ejemplos-tbk {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Bot?n gradiente */
.tbk-btn {
  background-image: linear-gradient(to right, rgba(213, 0, 108, 1), rgba(229, 57, 127, 1), rgba(242, 96, 141, 1));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 30px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
  transition: transform .2s, box-shadow .2s, background-image .2s;
}

.tbk-btn:hover {
  background-image: linear-gradient(to right, rgba(193, 0, 98, 1), rgba(209, 47, 117, 1), rgba(222, 86, 131, 1));
  box-shadow: 0 4px 8px rgba(0, 0, 0, .15);
}

.tbk-btn:active {
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.text-desktop-button {
  display: block;
}

.icon-mobile-button {
  display: none;
}

/* Notificaciones */
.tbk-ca-notification {
  padding: 15px 20px;
  border-radius: 4px;
  z-index: 1000;
  display: none;
  min-width: 250px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tbk-ca-notification.success {
  border: 1px solid #007A5A;
  background: #E8FCEE;
}

.tbk-ca-notification.error {
  border: 1px solid #db3645;
  background: #db3645;
  color: white;
}

.tbk-ca-notification.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideInRight 0.3s ease;
}

.tbk-ca-notification.hide {
  animation: slideOutRight 0.3s ease;
}

/* Contenido streaming */
.tbk-ca-streaming-content {
  opacity: 0;
  animation: smoothFadeIn 0.4s ease-out forwards;
}

.tbk-ca-streaming-content p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
  opacity: 0;
  animation: smoothSlideIn 0.5s ease-out forwards;
  transform: translateY(10px);
}

.tbk-ca-streaming-content p:nth-child(1) {
  animation-delay: 0.1s;
}

.tbk-ca-streaming-content p:nth-child(2) {
  animation-delay: 0.2s;
}

.tbk-ca-streaming-content p:nth-child(3) {
  animation-delay: 0.3s;
}

.tbk-ca-streaming-content p:nth-child(4) {
  animation-delay: 0.4s;
}

.tbk-ca-streaming-content p:nth-child(5) {
  animation-delay: 0.5s;
}

.message-no-results {
  color: #030047;
}

#btnSinRespuesta {
  position: absolute;
  right: 1.2em;
  font-size: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

#contenedor-sin-respuesta,
#contenedor-sin-respuesta textarea {
  background: white;
}

/* BOTON RESPUESTA AI */
.text-respuesta-ai-cda {
  background: linear-gradient(45deg, #D5006C, #E5397F, #F2608D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes smoothFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes smoothSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (min-width: 1200px) {
  #contenedor-sin-respuesta {
    width: 77%;
  }

  p.message-no-results {
    width: 90% !important;
  }
}

@media (max-width: 1200px) {
  .contenedor-imagen-sin-respuesta {
    width: 100%;
    justify-content: center;
    display: flex;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .tbk-ca-notification {
    right: 10px;
    left: 10px;
    min-width: auto;
  }

  .text-desktop-button {
    display: none;
  }

  .icon-mobile-button {
    display: block;
  }

  .tbk-ca-container {
    margin: 20px;
    padding: 20px;
  }

  .tbk-ca-title {
    font-size: 22px;
  }

  .tbk-ca-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .tbk-ca-share {
    margin-top: 15px;
  }

  .tbk-ca-related {
    text-align: center;
  }

  .tbk-ca-related-q {
    padding: 2rem;
  }

  .tbk-ca-ai-img {
    max-width: 180px;
    margin: 20px auto 0;
    display: block;
  }

  .tbk-ca-loading-content {
    padding: 20px;
  }

  .tbk-ca-loading-text {
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .tbk-ca-container {
    padding: 15px;
    margin: 10px;
  }

  .tbk-ca-query-bubble {
    max-width: 100%;
  }

  .tbk-ca-ai-img {
    max-width: 150px;
  }

  .tbk-ca-title {
    font-size: 20px;
  }

  .tbk-ca-subtitle {
    font-size: 14px;
  }

  .tbk-ca-loading-content {
    padding: 15px;
  }

  .tbk-ca-loading-text {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* FEEDBACK */

.feedback-seccion {
  display: flex;
  justify-content: space-between;
}

.feedback {
  margin-bottom: 100px;
  width: 56%;
}

.texto-feedback {
  width: 40%;
}

.paso-uno {
  border: 1px solid #D7006A;
  padding: 23px;
  border-radius: 16px;
  gap: 48px;
  display: flex;
  justify-content: center;
}

.btn-feedback {
  border-radius: 50rem;
  background-color: #F5F7FA;
  fill: #707382;
  width: 80px;
  height: 36px;
  margin-top: -12px;
  border: none;
}

.btn-feedback:active, .btn-feedback:focus, .btn-feedback:focus-visible {
  background: #d5006c;
  fill: #fff !important;
  outline: none !important;
  color: #ffffff !important;
}

.btn-feedback svg {
  fill: #707382;
}

.btn-feedback:active svg, .btn-feedback:focus svg, .btn-feedback:focus-visible svg {
  fill: #ffffff;
}

.paso-uno .active {
  background: #d5006c;
  color: #ffffff;
}

.paso-uno .active svg {
  fill: #ffffff;
}

.paso-dos {
  margin: 0 auto;
  width: 100%;
}

.paso-dos ul {
  list-style: none;
}

.paso-dos ul li {
  margin-bottom: 12px;
  line-height: 2em;
  display: flex;
  align-items: flex-start;
}

.radio-feedback {
  width: 30px;
  position: relative;
  top: 10px;
}

.label-feedback {
  width: calc(100% - 50px);
}

.paso-dos textarea {
  border-radius: 4px;
  width: 100%;
  border: 1px solid gray;
  padding: 10px;
}

.paso-tres {
  background-color: #f5f7fa;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  margin: 15px auto;
}

.icono-like {
  width: 36px;
  height: 36px;
  display: block;
  background: #00D298;
  text-align: center;
  border-radius: 50%;
  line-height: 29px;
}

.icono-like svg {
  fill: #ffffff;
}

.feedback-opcion input[type="radio"] {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px !important;
  overflow: hidden;
  padding: 0 !important;
  width: 1px !important;
}

.feedback-opcion label {
  display: inline-flex;
  align-items: center;
}

.feedback-opcion label::before {
  content: '';
  display: block;
  height: 1.25em;
  width: 1.25em;
  border: solid 1px #000000;
  border-radius: 50%;
  margin-right: 0.5em;
}


input[type="radio"]:checked + label::before {
  background: radial-gradient(0.75em circle at center, #d5006c 50%, transparent 55%);
  border-color: #000;
}

#enviarFeedbackNo {
  border-radius: 4px;
  background: #F5F7FA;
  color: #707382;
  padding: 12px 34px;
}

.activebtnEnviarFeedback {
  background: #d5006c !important;
  color: #fff !important;
}

.enlace-what:hover {
  color: #d5006c !important;
}

.paso-uno div:last-child {
  margin-top: 0;
}

.tbk-ca-container {
  position: relative;
}

.tbk-ca-loading-screen,
.tbk-ca-error-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: inherit;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tbk-ca-loading-content {
  width: 100%;
  padding: 2rem;
}

.tbk-ca-status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 3rem auto;
  padding: 2rem;
  max-width: 390px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  min-height: 200px;
}

.tbk-ca-status-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tbk-ca-spinner {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tbk-ca-status-message {
  text-align: center;
  color: #333;
  margin-bottom: 1.5rem;
  min-height: 60px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tbk-ca-status-item {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border-radius: 12px;
  font-weight: 500;
  width: 100%;
  text-align: center;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOutSlide {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

.tbk-ca-status-progress {
  width: 100%;
  height: 6px;
  background: rgba(224, 224, 224, 0.4);
  border-radius: 3px;
  overflow: hidden;
}

.tbk-ca-status-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #D5006C, #FF1493, #D5006C);
  background-size: 200% 100%;
  border-radius: 3px;
  animation: progressAnimation 2.5s ease-in-out infinite;
}

@keyframes progressAnimation {
  0% {
    width: 0%;
    background-position: 0% 50%;
  }
  50% {
    width: 70%;
    background-position: 100% 50%;
  }
  100% {
    width: 100%;
    background-position: 0% 50%;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tbk-ca-volver-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.tbk-ca-volver-btn:hover {
  opacity: 0.7;
}

.tbk-ca-volver-btn i {
  font-size: 1.25rem;
}

.tbk-ca-error-screen {
  position: relative;
  align-items: flex-start;
  padding: 2rem 1rem;
  min-height: 700px;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tbk-ca-container:has(#error-screen[style*="display: flex"]),
.tbk-ca-container:has(#error-screen[style*="display: block"]) {
  min-height: 700px;
  height: auto;
}

#error-screen .d-flex {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

#error-screen .contenedor-imagen-sin-respuesta {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#error-screen .img-sin-respuesta {
  max-width: 100%;
  height: auto;
}

.btn-feedback.active svg path,
.icono-like svg path {
  fill: white !important;
}

.btn-feedback.active {
  background-color: #D5006C;
  color: white;
}

@media (max-width: 1199px) {
  .feedback-seccion {
    display: block;
  }

  .paso-dos {
    width: 100%;
  }

  .paso-tres {
    display: block;
    width: 100%;
  }

  .icono-like:before {
    top: 0;
  }

  .paso-dos li label {
    width: calc(100% - -10px);
  }

  .feedback {
    width: 100%;
    margin-bottom: 0;
  }

  .texto-feedback {
    width: 100%;
    text-align: center;
  }

  .paso-uno div:last-child {
    margin-top: 0;
  }

}

@media (max-width: 767px) {
  .feedback-seccion {
    display: block;
  }

  .paso-uno {
    display: block;
    text-align: center;
  }

  .paso-uno div:last-child {
    margin-top: 20px;
  }

  .paso-ok {
    display: block !important;
    text-align: center;
  }

  .paso-ok .icono-like {
    margin: 0 auto !important;
  }
}