#top {
  display: flex;
  background-color: var(--ui-color);
  margin-bottom: 0.3em;
  text-align: center;
  position: sticky;
  padding-left: 0.3em;
  gap: 0.3em;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.top_button {
  cursor: pointer;
  flex: 0.1;
  width: 100%;
  height: 100%;
  max-width: 5em;
  border-radius: 5px;
  background-color: var(--ui-color);
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0.1em;
  color: var(--ui-text-color);
}

.top_button:hover {
  background-color: var(--ui-highlight);
}

.disabled:hover {
  cursor: not-allowed !important;
  background-color: var(--ui-color) !important;
}

.selected {
  background-color: var(--ui-highlight) !important;
}

#tools {
  display: flex;
  background-color: var(--bg-color);
  text-align: center;
  position: sticky;
  padding: 0.3em;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: flex-start;
  align-items: center;
  border-radius: 10px;
  gap: 0.3em;
  margin-top: 0.3em;
  height: 70px;
}

#tools * {
  user-select: none;
}

#tools .top_button {
  flex: 0.5em;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  width: 80px;
  max-width: none;
}

#tools img {
  max-height: 90%;
}

#top_buttons {
  display: flex;
  background-color: var(--ui-color);
  text-align: center;
  position: sticky;
  padding: 0;
  gap: 0.3em;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: 10em;
}

#top_buttons .top_button {
  flex: 0.5;
}

.invisible {
  user-select: none;
  pointer-events: none;
  opacity: 0;
}

.toggle-border {
  border: 2px solid #f0ebeb;
  border-radius: 130px;
  padding: 1px 2px;
  background: white;
  box-shadow: 0 0 0 2px #fbfbfb;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.toggle-border:last-child {
  margin-bottom: 0;
}

.toggle-border input[type="checkbox"] {
  display: none;
}

.toggle-border label {
  position: relative;
  display: inline-block;
  width: 65px;
  height: 20px;
  background: #d13613;
  border-radius: 80px;
  cursor: pointer;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}

.toggle-border input[type="checkbox"]:checked + label {
  background: #13d162;
}

.handle {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border: 1px solid #e5e5e5;
  background: white;
  border-radius: 50%;
  box-shadow: 3px 5px 10px 3px rgba(0, 0, 0, 0.4);
  transition: left 0.1s;
}

.toggle-border input[type="checkbox"]:checked + label > .handle {
  left: calc(100% - 20px + 1px);
}

.false_tool > * {
  width: 50%;
}
