/*
===============================================================================
  GENESIS CAMERA SWITCH - Seletor de câmera quando há múltiplos dispositivos
===============================================================================
  Adiciona botão 🔄 no header da miniatura que abre um dropdown listando
  todas as câmeras disponíveis (front/back em mobile, webcam + USB em desktop).
  Classes isoladas com prefix .gcs-*
*/

/* Botão do seletor (visual igual aos outros .gct-btn) */
.gct-btn.gcs-btn{
  /* herda estilos base de .gct-btn */
}
.gct-btn.gcs-btn.gcs-active{
  background: rgba(0, 240, 255, .35);
  box-shadow: 0 0 10px rgba(0, 240, 255, .7);
}

/* Dropdown com lista de câmeras */
.gcs-dropdown{
  background: linear-gradient(180deg, rgba(0, 10, 25, 0.97), rgba(0, 20, 45, 0.94));
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 10px;
  padding: 8px;
  min-width: 240px;
  max-width: 340px;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.35),
              0 0 0 1px rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  animation: gcsFadeIn .2s;
}
@keyframes gcsFadeIn{
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gcs-dropdown-title{
  font-size: 9px;
  letter-spacing: 2.5px;
  color: rgba(0, 240, 255, 0.7);
  padding: 4px 8px 8px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  margin-bottom: 4px;
  font-weight: 700;
}

.gcs-dropdown-item{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #e0f7ff;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-radius: 6px;
  transition: .2s;
  text-align: left;
  margin-bottom: 2px;
}
.gcs-dropdown-item svg{
  flex-shrink: 0;
  stroke: rgba(0, 240, 255, 0.7);
}
.gcs-dropdown-item:hover{
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.3);
}
.gcs-dropdown-item:hover svg{
  stroke: #00f0ff;
  filter: drop-shadow(0 0 4px #00f0ff);
}
.gcs-dropdown-item.gcs-current{
  background: rgba(0, 240, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.4);
  color: #00f0ff;
}
.gcs-dropdown-item.gcs-current svg{
  stroke: #00f0ff;
  filter: drop-shadow(0 0 3px #00f0ff);
}
.gcs-dropdown-item .gcs-name{
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcs-dropdown-item .gcs-check{
  color: #0f8;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
  text-shadow: 0 0 4px #0f8;
}

.gcs-dropdown-empty{
  padding: 12px;
  font-size: 11px;
  color: rgba(0, 240, 255, 0.5);
  text-align: center;
  letter-spacing: 1.5px;
  font-family: 'Orbitron';
}


/* Tema claro */
body.light-theme .gcs-dropdown{
  background: linear-gradient(180deg, rgba(238, 242, 246, 0.97), rgba(221, 228, 235, 0.94));
  border-color: rgba(0, 136, 200, 0.45);
  box-shadow: 0 10px 30px rgba(0, 136, 200, 0.25);
}
body.light-theme .gcs-dropdown-title{ color: #004870; border-bottom-color: rgba(0, 136, 200, 0.2); }
body.light-theme .gcs-dropdown-item{ color: #18222f; }
body.light-theme .gcs-dropdown-item svg{ stroke: rgba(0, 136, 200, 0.7); }
body.light-theme .gcs-dropdown-item:hover{ background: rgba(0, 168, 222, 0.1); border-color: rgba(0, 136, 200, 0.4); }
body.light-theme .gcs-dropdown-item:hover svg{ stroke: #0088c8; }
body.light-theme .gcs-dropdown-item.gcs-current{ background: rgba(0, 168, 222, 0.15); border-color: rgba(0, 136, 200, 0.5); color: #0088c8; }
