@charset "utf-8";
/* ============================================================ */
/* INTERFAZ DE CHAT MASTERTEC - ADVANCED HUD / TACTICAL HOLO    */
/* ============================================================ */

:root {
  /* Paleta Corporativa Mastertec -> Modo Emisión de Luz */
  --mttc-hud-blue: #00d4ff; 
  --mttc-hud-orange: #88ebff; 
  --mttc-hud-blue2: #021631; 
  --mttc-hud-bg: rgba(2, 22, 49, 0.85); 
  --mttc-hud-grid: rgba(0, 212, 255, 0.05);
}

#mttc-chat-container {
  position: fixed;
  bottom: 170px; 
  right: 30px;
  z-index: 21000;
  font-family: 'Segoe UI', Roboto, Helvetica, sans-serif;
  transition: all 0.3s ease; 
}

/* ========================================== */
/* 1. BOTÓN FLOTANTE (Radar Táctico)          */
/* ========================================== */
#mttc-chat-toggle {
  background: rgba(0, 137, 198, 0.1);
  color: var(--mttc-hud-blue);
  border: 1px solid var(--mttc-hud-blue);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
  position: relative;
  transition: all 0.3s ease;
}

#mttc-chat-toggle::before {
  content: '';
  position: absolute;
  top: -5px; left: -5px; right: -5px; bottom: -5px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--mttc-hud-orange);
  border-left-color: var(--mttc-hud-blue);
  animation: mttc-radar-spin 3s linear infinite;
  pointer-events: none;
}

#mttc-chat-toggle:hover {
  background: rgba(0, 137, 198, 0.3);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
  transform: scale(1.05);
}

@keyframes mttc-radar-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================== */
/* 2. GLOBITO LATERAL (Etiqueta de Datos)     */
/* ========================================== */
#mttc-tooltip {
  position: absolute;
  right: 80px;
  bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 22000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s, visibility 0.3s;
}

#mttc-tooltip-close {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: var(--mttc-hud-blue2);
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  line-height: 1;
}

#mttc-tooltip-text {
  background: #ffffff; /* ¡Fondo completamente blanco y sólido! */
  color: var(--mttc-hud-blue2);
  padding: 6px 12px;
  border-left: 3px solid var(--mttc-hud-orange);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 4px;
  animation: mttc-data-blink 4s infinite;
  
  /* Agregamos una sombra sutil elegante para darle volumen */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

@keyframes mttc-data-blink {
  0%, 95%, 100% { opacity: 1; }
  96%, 98% { opacity: 0; }
}

.mttc-force-hide {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ========================================== */
/* 3. VENTANA DE CHAT (Panel de Monitoreo)    */
/* ========================================== */
#mttc-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  height: 520px;
  background: var(--mttc-hud-bg);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px; 
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#mttc-chat-window::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(var(--mttc-hud-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--mttc-hud-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

.mttc-hud-bracket-tl, .mttc-hud-bracket-br {
  position: absolute;
  width: 30px;
  height: 30px;
  pointer-events: none;
  z-index: 100;
}
.mttc-hud-bracket-tl {
  top: 0; left: 0;
  border-top: 2px solid var(--mttc-hud-blue);
  border-left: 2px solid var(--mttc-hud-blue);
  box-shadow: inset 2px 2px 5px rgba(0, 212, 255, 0.2);
}
.mttc-hud-bracket-br {
  bottom: 0; right: 0;
  border-bottom: 2px solid var(--mttc-hud-orange);
  border-right: 2px solid var(--mttc-hud-orange);
  box-shadow: inset -2px -2px 5px rgba(255, 119, 0, 0.2);
}

.mttc-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.95);
}

#mttc-chat-header {
  background: rgba(0, 212, 255, 0.05);
  color: var(--mttc-hud-blue);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  position: relative;
  z-index: 10;
}

.mttc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--mttc-hud-blue);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
  object-fit: cover;
}

.mttc-header-info h4 {
  margin: 0; font-size: 16px; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.mttc-header-info h4::before {
  content: '';
  width: 8px; height: 8px;
  background-color: #00ff00;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff00;
  animation: mttc-pulse-dot 2s infinite;
}

@keyframes mttc-pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#mttc-chat-close {
  background: none; border: none;
  color: var(--mttc-hud-blue);
  font-size: 28px; cursor: pointer;
  transition: color 0.2s;
}
#mttc-chat-close:hover {
  color: var(--mttc-hud-orange);
}

#mttc-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.mttc-message {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 4px;
  position: relative;
}

.mttc-bot-msg {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
  color: #e0f7ff;
  align-self: flex-start;
  border-left: 2px solid var(--mttc-hud-blue);
}

.mttc-user-msg {
  background: linear-gradient(-90deg, rgba(255, 119, 0, 0.1) 0%, transparent 100%);
  color: #fff;
  align-self: flex-end;
  border-right: 2px solid var(--mttc-hud-orange);
  text-align: right;
}

#mttc-chat-input-area {
  padding: 15px;
  background: rgba(2, 22, 49, 1);
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  display: flex; gap: 10px;
  position: relative; z-index: 10;
}

#mttc-user-input {
  flex: 1; padding: 10px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  color: #fff; font-size: 14px; outline: none;
  transition: all 0.3s;
}
#mttc-user-input:focus {
  border-color: var(--mttc-hud-blue);
  box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.2);
}

#mttc-send-btn {
  background: rgba(0, 212, 255, 0.1);
  color: var(--mttc-hud-orange);
  border: 1px solid var(--mttc-hud-orange);
  border-radius: 4px; padding: 10px 15px; cursor: pointer;
  transition: all 0.2s;
}
#mttc-send-btn:hover {
  background: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* ========================================== */
/* MÓVIL RESPONSIVE (Ajustes de Alta Precisión) */
/* ========================================== */

@media (max-width: 480px) {
  #mttc-chat-container {
    bottom: 90px; 
    right: 15px;  
  }

  #mttc-chat-toggle {
    width: 55px;
    height: 55px;
  }

  #mttc-tooltip {
    display: flex !important; 
    right: 65px; 
    bottom: 10px;
    font-size: 10px; 
    padding: 4px 8px;
    gap: 8px;
  }
  
  #mttc-tooltip::after {
    right: -5px;
    border-width: 5px 0 5px 5px;
  }

  #mttc-chat-window {
    width: calc(100vw - 30px); 
    right: 0;
    height: 65vh; 
    max-height: 480px; 
    bottom: 75px; 
  }
  
  .mttc-hud-bracket-tl, .mttc-hud-bracket-br {
    width: 20px;
    height: 20px;
  }

  #mttc-chat-header {
    padding: 10px 15px;
  }
  
  .mttc-header-info h4 {
    font-size: 14px; 
  }

  #mttc-chat-messages {
    padding: 12px;
    gap: 10px;
  }

  .mttc-message {
    font-size: 13px; 
    padding: 8px 12px;
  }

  #mttc-chat-input-area {
    padding: 10px;
  }
  
  #mttc-user-input {
    font-size: 13px;
    padding: 8px 10px;
  }
}