/* Chat de CercaYa — burbuja flotante, sin dependencias */
.cy-chat-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 2147483000;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: #E4572E; color: #fff; font-size: 24px; line-height: 1;
  box-shadow: 0 6px 20px rgba(30,36,48,.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.cy-chat-btn:hover { transform: scale(1.06); }
.cy-chat-btn[aria-expanded="true"] { display: none; }

.cy-chat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 2147483001;
  width: 360px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(30,36,48,.28);
  display: none; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cy-chat-panel.abierto { display: flex; }

.cy-chat-head {
  background: #E4572E; color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.cy-chat-head strong { font-size: 15px; font-weight: 700; }
.cy-chat-head small { display: block; font-size: 12px; opacity: .85; font-weight: 400; }
.cy-chat-cerrar {
  background: transparent; border: none; color: #fff; font-size: 22px;
  cursor: pointer; line-height: 1; padding: 0 2px;
}

.cy-chat-msgs {
  flex: 1; overflow-y: auto; padding: 14px; background: #FFF9F4;
  display: flex; flex-direction: column; gap: 10px;
}
.cy-msg {
  max-width: 85%; padding: 10px 12px; border-radius: 14px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word;
}
.cy-msg.cy-bot {
  background: #fff; color: #1E2430; border: 1px solid #F0E2D6;
  border-bottom-left-radius: 4px; align-self: flex-start;
}
.cy-msg.cy-user {
  background: #E4572E; color: #fff; border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.cy-msg.cy-typing { color: #5C6575; font-style: italic; }

/* Botones de acción bajo el mensaje (enlaces del sitio, WhatsApp…) */
.cy-acciones {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-self: flex-start; max-width: 85%;
}
.cy-accion {
  display: inline-block; padding: 9px 14px; border-radius: 999px;
  background: #fff; color: #C7431F; border: 1.5px solid #E4572E;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background .15s, color .15s;
}
.cy-accion:hover { background: #E4572E; color: #fff; }

.cy-chat-form {
  display: flex; gap: 8px; padding: 10px; border-top: 1px solid #F0E2D6;
  background: #fff;
}
.cy-chat-form input {
  flex: 1; border: 1px solid #F0E2D6; border-radius: 999px;
  padding: 10px 14px; font-size: 14px; outline: none; color: #1E2430;
  font-family: inherit;
}
.cy-chat-form input:focus { border-color: #E4572E; }
.cy-chat-form button {
  border: none; background: #E4572E; color: #fff; border-radius: 999px;
  width: 40px; height: 40px; font-size: 16px; cursor: pointer; flex: 0 0 auto;
}
.cy-chat-form button:disabled { opacity: .5; cursor: default; }

.cy-chat-pie {
  font-size: 11px; color: #5C6575; text-align: center; padding: 0 10px 8px;
  background: #fff;
}
.cy-chat-pie a { color: #5C6575; }

@media (max-width: 480px) {
  .cy-chat-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: none; }
  .cy-chat-btn { right: 14px; bottom: 14px; }
}
