.cacho-bubble {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #ffc107;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  cursor: pointer;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.cacho-bubble img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
}

.cacho-chat {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 88vh;
  max-height: 880px;
  background: rgba(11, 13, 18, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  z-index: 9999;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
}

.cacho-chat.abierto {
  display: flex;
  flex-direction: column;
}

.cacho-header {
  background: rgba(17, 19, 26, 0.88);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid rgba(255,193,7,.85);
}

.cacho-header img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.cacho-header strong {
  display: block;
  font-size: 18px;
}

.cacho-header span {
  display: block;
  font-size: 12px;
  color: #ccc;
}

.cacho-header button {
  margin-left: auto;
  border: none;
  background: #e10600;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
}

.cacho-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: #ffc107 rgba(11,13,18,.4);
}

.cacho-messages::-webkit-scrollbar {
  width: 6px;
}

.cacho-messages::-webkit-scrollbar-track {
  background: rgba(11,13,18,.4);
}

.cacho-messages::-webkit-scrollbar-thumb {
  background: #ffc107;
  border-radius: 10px;
}

.cacho-msg {
  background: rgba(255,255,255,.10);
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  line-height: 1.42;
  white-space: pre-line;
  font-size: 14px;
}

.cacho-msg.cacho {
  border-left: 4px solid #ffc107;
}

.cacho-msg.pregunta-chat {
  cursor: pointer;
  border: 1px solid rgba(255,193,7,.55);
  border-left: 4px solid #ffc107;
  background: rgba(255,255,255,.08);
  font-weight: 700;
  transition: .22s ease;
}

.cacho-msg.pregunta-chat:hover {
  background: rgba(255,193,7,.17);
  transform: translateY(-1px);
}

.cacho-msg.categoria-chat {
  border-style: dashed;
}

.cacho-msg.opcion-si {
  border-left-color: #21c55d;
}

.cacho-msg.opcion-no {
  border-left-color: #e10600;
  opacity: .92;
}

/* BOTONES DE ACCIÓN: VIDEO / FORMULARIO / CONSULTA / MENÚ */

.cacho-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.cacho-actions button,
.cacho-actions a {
  flex: 1 1 120px;
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  text-align: center;
  text-decoration: none;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .22s ease;
}

.cacho-actions button:hover,
.cacho-actions a:hover {
  background: rgba(255,193,7,.16);
  border-color: rgba(255,193,7,.75);
  transform: translateY(-1px);
}

.cacho-actions .secundario {
  flex-basis: 100%;
  background: rgba(255,255,255,.10);
}

.cacho-actions input,
.cacho-actions textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,.92);
  color: #111;
  outline: none;
  padding: 12px;
  border-radius: 10px;
  border: none;
}

.cacho-footer {
  padding: 8px;
  text-align: center;
  font-size: 11px;
  color: #aaa;
  background: rgba(9,10,14,.82);
}

@media (max-width: 600px) {
  .cacho-chat {
    right: 5vw;
    bottom: 5vh;
    top: auto;
    transform: none;
    width: 90vw;
    height: 80vh;
    max-width: none;
    max-height: none;
    border-radius: 22px;
  }

  .cacho-bubble {
    right: 18px;
    bottom: 18px;
    width: 66px;
    height: 66px;
  }

  .cacho-bubble img {
    width: 60px;
    height: 60px;
  }

  .cacho-msg {
    font-size: 13.5px;
  }

  .cacho-actions button,
  .cacho-actions a {
    flex: 1 1 100%;
  }
}