/* ============================================================
   RIYIVZLA R-iA AI CHATBOT WIDGET STYLES — FIXED POSITIONING
   ============================================================ */

.ria-widget {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 99999 !important;
}

@media (max-width: 1024px) {
  .ria-widget {
    bottom: 80px !important;
    left: 20px !important;
    right: auto !important;
  }
}

/* Botón flotante del Asistente R-iA */
.ria-trigger-btn {
  background: linear-gradient(135deg, #00FF88 0%, #00f2fe 100%);
  border: 2px solid #ffffff;
  border-radius: 50px;
  padding: 8px 16px;
  color: #000;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ria-trigger-btn img {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
}

.ria-trigger-btn:hover {
  transform: scale(1.08) translateY(-2px);
}

/* Ventana emergente de R-iA */
.ria-chat-card {
  display: none;
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 100px);
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  flex-direction: column;
  overflow: hidden;
  z-index: 100000;
}

@media (max-width: 1024px) {
  .ria-chat-card {
    left: 0;
    right: auto;
  }
}

.ria-chat-card.is-active {
  display: flex;
}

.ria-header {
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.ria-brand-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ria-brand-info img {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  border: 1px solid #00FF88;
}

.ria-title-text h4 {
  margin: 0;
  color: #00FF88;
  font-size: 0.9rem;
  font-weight: 800;
}

.ria-title-text span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
}

.ria-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
  cursor: pointer;
}

.ria-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ria-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.ria-msg--bot {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.25);
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ria-msg--user {
  background: #00FF88;
  color: #000;
  font-weight: 700;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ria-actions-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
}

.ria-whatsapp-link {
  background: #25D366;
  color: #000;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 50px;
  text-align: center;
  display: block;
}

.ria-input-row {
  display: flex;
  gap: 8px;
}

.ria-input-row input {
  flex: 1;
  padding: 8px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}

.ria-input-row button {
  background: #00FF88;
  color: #000;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
