/**
 * WebWay Modo Streamer — Estilos Visuais do Overlay e HUD Flutuante
 *
 * @author Victor Lacerda Azevedo
 * @version 2.0 (2026-07-22)
 */

/* Container Raiz do Overlay de Streamer — acima de tudo no app */
#ww-streamer-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483000;
  overflow: hidden;
}

/* Canvas de Renderização dos Efeitos (Ripples e Rastro) */
#ww-streamer-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  display: block;
}

/* HUD Flutuante — Widget de Controle */
#ww-streamer-toolbar {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 2147483001;
  pointer-events: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* HUD — Estado Minimizado (Pequeno Botão Circular Flutuante) */
#ww-streamer-toolbar.ww-streamer-hud--minimized .ww-streamer-hud-body {
  display: none !important;
}

#ww-streamer-toolbar.ww-streamer-hud--minimized .ww-streamer-hud-min-btn {
  display: flex !important;
}

.ww-streamer-hud-min-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 24, 33, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #00E5FF;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ww-streamer-hud-min-btn:hover {
  transform: scale(1.08);
  background: rgba(30, 36, 50, 0.95);
  color: #38edf8;
  box-shadow: 0 8px 25px rgba(0, 229, 255, 0.3);
}

/* HUD — Estado Expandido (Painel compacto) */
.ww-streamer-hud-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 300px;
  max-width: calc(100vw - 36px);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(18, 22, 31, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.ww-streamer-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ww-streamer-hud-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Indicator LED Status */
.ww-streamer-hud-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: #e2e8f0;
}

.ww-streamer-led-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: ww-streamer-pulse 2s infinite;
}

@keyframes ww-streamer-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ww-streamer-hud-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ww-streamer-hud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ww-streamer-hud-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.ww-streamer-hud-btn:active {
  transform: scale(0.96);
}

.ww-streamer-hud-btn--on {
  background: rgba(0, 229, 255, 0.18);
  color: #67f0ff;
  border-color: rgba(0, 229, 255, 0.45);
}

.ww-streamer-hud-btn--on:hover {
  background: rgba(0, 229, 255, 0.28);
  color: #9af5ff;
}

.ww-streamer-hud-btn--close {
  color: #f87171;
}

.ww-streamer-hud-btn--close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.ww-streamer-hud-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ww-streamer-hud-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.ww-streamer-hud-row input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #00E5FF;
  cursor: pointer;
}

.ww-streamer-swatches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.ww-streamer-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.ww-streamer-swatch:hover {
  transform: scale(1.1);
}

.ww-streamer-swatch--active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.55);
}

.ww-streamer-hud-row input[type="color"],
.ww-streamer-swatches input[type="color"] {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.ww-streamer-hud-timers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ww-streamer-hud-timers .ww-streamer-hud-label {
  flex-direction: column;
  align-items: stretch;
}

.ww-streamer-hud-timers input[type="number"] {
  width: 100%;
  height: 24px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: #e2e8f0;
  font-size: 11px;
}

/* VOIP panel streamer extras */
.voip-streamer-custom-panel .voip-streamer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.voip-streamer-custom-panel .voip-streamer-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.voip-streamer-custom-panel .voip-streamer-swatch-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  padding: 0;
  cursor: pointer;
}

.voip-streamer-custom-panel .voip-streamer-swatch-btn.is-active {
  outline: 2px solid #00E5FF;
  outline-offset: 1px;
}

/* Reduced Motion Mode Support */
@media (prefers-reduced-motion: reduce) {
  .ww-streamer-led-dot {
    animation: none;
  }
  #ww-streamer-toolbar {
    transition: none;
  }
}
