/**
 * chat.css - Estilos Holográficos y Glassmorphism para el Chat Overlay de OBS
 */

/* ========================================================
   PANEL DE CONFIGURACIÓN DEL CHAT
   ======================================================== */

.chat-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .chat-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.chat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.chat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.chat-card-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Previsualización en Vivo */
.chat-preview-box {
  background: radial-gradient(circle at top right, rgba(145, 71, 255, 0.1), rgba(10, 10, 20, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  height: 480px;
  overflow-y: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

/* Selector de Temas */
.chat-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.chat-theme-btn {
  background: rgba(20, 20, 35, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.chat-theme-btn:hover {
  border-color: var(--twitch-purple-light);
  background: rgba(145, 71, 255, 0.15);
}

.chat-theme-btn.active {
  border-color: var(--twitch-purple);
  background: rgba(145, 71, 255, 0.25);
  box-shadow: 0 0 15px rgba(145, 71, 255, 0.3);
}

/* ========================================================
   ESTILOS DE MENSAJES PARA OBS (OVERLAY TRANSPARENTE)
   ======================================================== */

.chat-overlay-mount {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden;
  pointer-events: none;
}

.chat-msg-item {
  animation: chatMsgIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.4s ease, transform 0.4s ease;
  word-break: break-word;
  line-height: 1.4;
}

.chat-msg-item.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes chatMsgIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* TEMA 1: MODERN GLASS (Por Defecto) */
.theme-glass .chat-msg-box {
  background: rgba(15, 15, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* TEMA 2: CYBER NEON */
.theme-cyber .chat-msg-box {
  background: rgba(5, 5, 15, 0.9);
  border: 1px solid var(--accent-cyan);
  border-radius: 4px;
  padding: 0.55rem 0.85rem;
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.25);
}

/* TEMA 3: MINIMALIST SHADOW */
.theme-minimal .chat-msg-box {
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.8);
}

/* TEMA 4: GAMER PILL */
.theme-pill .chat-msg-box {
  background: rgba(25, 20, 45, 0.85);
  border: 1px solid rgba(145, 71, 255, 0.4);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Header del mensaje (Insignias + Nombre de usuario) */
.chat-msg-header {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.4rem;
}

.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 800;
  line-height: 1;
}

.badge-broadcaster { background: #ef4444; color: #fff; }
.badge-moderator { background: #10b981; color: #fff; }
.badge-vip { background: #ec4899; color: #fff; }
.badge-subscriber { background: #8b5cf6; color: #fff; }

.chat-user-name {
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.2px;
}

.chat-msg-text {
  font-size: 0.92rem;
  color: #f1f5f9;
}

.chat-msg-item.highlight-sub .chat-msg-box {
  border-color: rgba(236, 72, 153, 0.6);
  background: rgba(236, 72, 153, 0.15);
}

.chat-msg-item.highlight-mod .chat-msg-box {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.15);
}
