﻿/* Janus Chat Widget - Estilos consistentes con janus-landing */
:root {
  --chat-gold: #d4a853;
  --chat-gold-light: #f0c040;
  --chat-gold-dark: #b8860b;
  --chat-bg: #ffffff;
  --chat-bg-msg: #f9fafb;
  --chat-bg-user: linear-gradient(135deg, #d4a853, #f0c040);
  --chat-text: #1f2937;
  --chat-text-light: #6b7280;
  --chat-shadow: 0 10px 40px rgba(0,0,0,0.15);
  --chat-radius: 16px;
  --chat-font: "Inter", -apple-system, sans-serif;
}

#janus-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-gold), var(--chat-gold-light));
  border: none;
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.4);
  cursor: pointer;
  z-index: 9999;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  color: #1f2937;
}

#janus-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(212, 168, 83, 0.5);
}

#janus-chat-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  height: 520px;
  background: var(--chat-bg);
  border-radius: var(--chat-radius);
  box-shadow: var(--chat-shadow);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--chat-font);
  border: 1px solid #e5e7eb;
}

#janus-chat-window.open {
  display: flex;
  animation: chat-slide-up 0.3s ease;
}

@keyframes chat-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.janus-chat-header {
  background: linear-gradient(135deg, var(--chat-gold), var(--chat-gold-light));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.janus-chat-header h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 1px;
}

.janus-chat-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #1f2937;
  opacity: 0.7;
  padding: 4px;
  line-height: 1;
}

.janus-chat-close:hover {
  opacity: 1;
}

.janus-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafafa;
}

.janus-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: msg-in 0.2s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.janus-msg.user {
  align-self: flex-end;
  background: var(--chat-bg-user);
  color: #1f2937;
  border-bottom-right-radius: 4px;
}

.janus-msg.bot {
  align-self: flex-start;
  background: var(--chat-bg-msg);
  color: var(--chat-text);
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

.janus-msg.bot .typing {
  display: inline-block;
  animation: blink 1s infinite;
}

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

.janus-msg.error {
  align-self: flex-start;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.janus-chat-input-area {
  display: flex;
  padding: 12px 16px;
  gap: 8px;
  border-top: 1px solid #e5e7eb;
  background: var(--chat-bg);
  flex-shrink: 0;
}

.janus-chat-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--chat-font);
  outline: none;
  transition: border-color 0.2s;
}

.janus-chat-input:focus {
  border-color: var(--chat-gold);
  box-shadow: 0 0 0 2px rgba(212, 168, 83, 0.2);
}

.janus-chat-send {
  background: linear-gradient(135deg, var(--chat-gold), var(--chat-gold-light));
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
  flex-shrink: 0;
  color: #1f2937;
}

.janus-chat-send:hover {
  transform: scale(1.05);
}

.janus-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.janus-chat-powered {
  text-align: center;
  font-size: 11px;
  color: var(--chat-text-light);
  padding: 6px;
  border-top: 1px solid #f3f4f6;
  flex-shrink: 0;
  background: var(--chat-bg);
}

.janus-chat-powered a {
  color: var(--chat-gold-dark);
  text-decoration: none;
}

@media (max-width: 480px) {
  #janus-chat-window {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  #janus-chat-btn {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}
