/* ==========================================================================
   INTERRUPTOR DE TEMA NEUMÓRFICO (3 ESTADOS)
   ========================================================================== */
.theme-toggle-switch {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 0 !important;
  display: inline-flex;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-switch .switch-inner {
  background-color: #e2e8f0;
  width: 78px;
  height: 40px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  position: relative;
  box-shadow: -3px -3px 6px rgba(255, 255, 255, 0.9), 3px 3px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

body.dark-mode .theme-toggle-switch .switch-inner {
  background-color: #1e2530;
  box-shadow: -2px -2px 5px rgba(255, 255, 255, 0.05), 2px 2px 5px rgba(0, 0, 0, 0.4);
}

.switch-handle {
  width: 32px;
  height: 32px;
  background-color: #ffffff;
  border-radius: 50%;
  position: absolute;
  left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15), -2px -2px 4px rgba(255, 255, 255, 0.8);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, box-shadow 0.3s ease, width 0.3s ease;
}

body.dark-mode .switch-handle {
  background-color: #2a3447;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4), -1px -1px 3px rgba(255, 255, 255, 0.05);
}

.theme-toggle-switch:active .switch-handle {
  width: 38px;
}

.theme-toggle-switch[data-mode="dark"] .switch-handle {
  transform: translateX(0px);
}
.theme-toggle-switch[data-mode="auto"] .switch-handle {
  transform: translateX(19px);
}
.theme-toggle-switch[data-mode="light"] .switch-handle {
  transform: translateX(38px);
}

.icon-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 16px;
  height: 16px;
  color: #4a5568;
  position: absolute;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

body.dark-mode .icon {
  color: #cbd5e0;
}

.theme-toggle-switch[data-mode="dark"] .icon-dark,
.theme-toggle-switch[data-mode="auto"] .icon-auto,
.theme-toggle-switch[data-mode="light"] .icon-light {
  opacity: 1;
  transform: scale(1);
}