/* FrogTech Design System — Green UI RC16.23.2 */
:root{
  --frog-green:#28dc55;
  --frog-green-strong:#19b943;
  --frog-green-soft:rgba(40,220,85,.17);
  --frog-surface:#071b10;
  --frog-border:#285039;
  --frog-muted:#91a798;
  --frog-danger:#ef5753;
  --frog-focus:0 0 0 3px rgba(40,220,85,.2);
}

/* Toggle global: substitui checkbox visual sem alterar nome/value ou envio do formulário. */
input[type="checkbox"].frog-toggle-input{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  flex:0 0 auto!important;
  width:50px!important;
  min-width:50px!important;
  height:26px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #446054!important;
  border-radius:999px!important;
  background:#26342e!important;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.38)!important;
  position:relative!important;
  vertical-align:middle!important;
  cursor:pointer!important;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease!important;
  outline:none!important;
  opacity:1!important;
  visibility:visible!important;
}
input[type="checkbox"].frog-toggle-input::before{
  content:"";
  position:absolute;
  z-index:2;
  width:20px;
  height:20px;
  left:2px;
  top:2px;
  border-radius:50%;
  background:#d9e2dd;
  box-shadow:0 2px 5px rgba(0,0,0,.42);
  transition:transform .18s ease,background .18s ease;
}
input[type="checkbox"].frog-toggle-input::after{
  content:"OFF";
  position:absolute;
  right:5px;
  top:50%;
  transform:translateY(-50%);
  color:#aebbb4;
  font-size:8px;
  line-height:1;
  font-weight:900;
  letter-spacing:.02em;
}
input[type="checkbox"].frog-toggle-input:checked{
  background:linear-gradient(135deg,var(--frog-green-strong),var(--frog-green))!important;
  border-color:var(--frog-green)!important;
}
input[type="checkbox"].frog-toggle-input:checked::before{
  transform:translateX(24px);
  background:#fff;
}
input[type="checkbox"].frog-toggle-input:checked::after{
  content:"ON";
  left:6px;
  right:auto;
  color:#05200d;
}
input[type="checkbox"].frog-toggle-input:hover:not(:disabled){border-color:var(--frog-green)!important}
input[type="checkbox"].frog-toggle-input:focus-visible{box-shadow:var(--frog-focus),inset 0 1px 3px rgba(0,0,0,.38)!important}
input[type="checkbox"].frog-toggle-input:disabled{opacity:.45!important;cursor:not-allowed!important;filter:grayscale(.35)}
input[type="checkbox"].frog-toggle-input.frog-toggle-dragging{transition:none!important}

/* Versão compacta para tabelas, listas e seleção em massa. */
input[type="checkbox"].frog-toggle-input.frog-toggle-compact{
  width:42px!important;
  min-width:42px!important;
  height:22px!important;
}
input[type="checkbox"].frog-toggle-input.frog-toggle-compact::before{width:16px;height:16px}
input[type="checkbox"].frog-toggle-input.frog-toggle-compact:checked::before{transform:translateX(20px)}
input[type="checkbox"].frog-toggle-input.frog-toggle-compact::after{font-size:7px;right:4px}
input[type="checkbox"].frog-toggle-input.frog-toggle-compact:checked::after{left:4px}

/* Evita duplicidade em componentes antigos que já desenhavam uma trilha. */
input.frog-toggle-input + .switch-ui,
input.frog-toggle-input + .switch-track,
input.frog-toggle-input + span:empty,
.mini-switch input.frog-toggle-input + span,
.row-check input.frog-toggle-input + span{display:none!important}

/* Alinhamento universal de opções. */
label:has(> input.frog-toggle-input),
label:has(input.frog-toggle-input){align-items:center}
.frog-toggle-label{display:inline-flex!important;align-items:center!important;gap:10px!important;cursor:pointer}
.frog-toggle-label.is-disabled{cursor:not-allowed;opacity:.65}

@media (prefers-reduced-motion:reduce){
  input[type="checkbox"].frog-toggle-input,
  input[type="checkbox"].frog-toggle-input::before{transition:none!important}
}
