/* Toggle Switch Styles - Universal */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f0f0f0;
  border-radius: 30px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: 'Arial', sans-serif;
}

.toggle-label {
  font-size: 10px;
  font-weight: bold;
  color: #333;
  text-transform: capitalize;
  letter-spacing: 0.3px;
  margin: 0;
  white-space: nowrap;
}

.toggle-label.off {
  color: #999;
}

/* Switch Toggle */
.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
  background-color: #ccc;
  border-radius: 13px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
  padding: 0;
}

.toggle-switch.active {
  background-color: #ff3333;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background-color: white;
  border-radius: 50%;
  transition: left 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
  left: 26px;
}

/* Container para el toggle en el header (Index) */
header .header-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* Container para el toggle en articulos */
.articulo-header .header-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* Responsive */
@media (max-width: 768px) {
  .toggle-container {
    padding: 10px 14px;
    gap: 7px;
  }

  .toggle-label {
    font-size: 9px;
  }

  .toggle-switch {
    width: 45px;
    height: 24px;
  }

  .toggle-switch::after {
    width: 20px;
    height: 20px;
  }

  .toggle-switch.active::after {
    left: 23px;
  }

  header .header-toggle,
  .articulo-header .header-toggle {
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .toggle-container {
    padding: 8px 11px;
    gap: 5px;
  }

  .toggle-label {
    font-size: 8px;
  }

  .toggle-switch {
    width: 40px;
    height: 22px;
  }

  .toggle-switch::after {
    width: 18px;
    height: 18px;
  }

  .toggle-switch.active::after {
    left: 20px;
  }

  header .header-toggle,
  .articulo-header .header-toggle {
    top: 12px;
    right: 12px;
  }
}
