/* Source https://github.com/Dave2ooo/F2LTrainer */

:root {
  --color-background: #1f3d52;
  --color-text: #ffffff;
  --color-text-inverted: black;
  /* --color-text-train: #c953c9; */
  --filter-img: invert(42%) sepia(93%) saturate(1352%) hue-rotate(87deg) brightness(119%) contrast(119%);
  --filter-white: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(305deg) brightness(102%)
    contrast(102%);
  --filter-black: brightness(0) saturate(100%) invert(0%) sepia(99%) saturate(40%) hue-rotate(77deg) brightness(100%)
    contrast(101%);
  --color-img: #00ee00;
  --color-popup: #1f3d52;
  --color-btn-hover: #140553;
  --color-overlay: gray;
  --color-unleaned: rgba(0, 0, 0, 0);
  --color-learning: rgb(236 236 0);
  --color-finished: rgb(0, 223, 0);
  --filter-learning: brightness(0) saturate(100%) invert(81%) sepia(53%) saturate(849%) hue-rotate(7deg)
    brightness(103%) contrast(100%);
  --filter-finished: brightness(0) saturate(100%) invert(52%) sepia(86%) saturate(3169%) hue-rotate(87deg)
    brightness(113%) contrast(117%);
}

html {
  color-scheme: dark;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--color-text);
  /* background-color: white; */
  background-color: var(--color-background);
  /* background-color: #fa8bff;
  background-image: linear-gradient(
    45deg,
    #fa8bff 0%,
    #2bd2ff 52%,
    #2bff88 90%
  ); */
  /* background-color: #4c4177;
  background-image: linear-gradient(315deg, #4c4177 0%, #2a5470 74%); */
  /* background-color: #0cbaba;
  background-image: linear-gradient(315deg, #0cbaba 0%, #380036 74%); */

  /* background: linear-gradient(150deg, #0093e9, #80d0c7); */
  /* background-attachment: fixed; */

  font-family: Arial, Helvetica, sans-serif;
}

li,
.label-state {
  width: fit-content;
  padding: 0.2rem;
  margin: 0.2rem;
  border-radius: 0.3rem;
  font-size: 1.2rem;
}
.color-transparent {
  /* border: dashed; */
  border: solid;
}
.color-yellow {
  /* border-style: dashed solid; */
  border-style: solid;
  background-color: var(--color-learning);
  color: var(--color-text-inverted);
}
.color-green {
  border: solid;
  background-color: var(--color-finished);
  color: var(--color-text-inverted);
}

.img-inline {
  width: 1rem;
  filter: var(--filter-img);
}

.border-inline {
  border-style: solid;
  border-color: var(--color-img);
  border-radius: 0.4rem;
  padding: 0.08rem;
}

/* Disable scolling */
/* html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
} */

button {
  background-color: transparent;
  border: none;
  color: var(--color-text);
}

iframe {
  /* display: none; */
  width: 100%;
  aspect-ratio: 16/9;
}

/* #thumbnail-button {
  display: none;
  width: 100%;
} */

.side-img,
.img-collapse-category,
.btn-next-prev {
  filter: var(--filter-img);
}

.flip-image,
.img-edit-trash {
  filter: var(--filter-white);
}

p,
a {
  font-size: 1.2rem;
  color: var(--color-text);
  line-height: 1.7rem;
  margin-top: auto;
  margin-bottom: auto;
}

.group-container {
  display: none;
  z-index: 0;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  /* margin-top: 30px; */
}

.collapse-container {
  display: flex;
  margin-top: 5px;
  padding-top: 10px;
  /* border-top: dotted; */
  /* cursor: pointer; */
  /* background-color: var(--color-background);
  opacity: 100%;
  z-index: 1; */
}

.img-collapse-category {
  /* height: 1rem;
  align-content: center; */
  /* height: auto; */
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 300ms;
}

.category-container {
  /* display: flex; */
  display: block;
  flex-direction: column;
  flex-grow: 0;
  justify-content: start;
  flex-wrap: wrap;
  border-bottom: dotted;
  /* transition: transform 300ms; */
}

.heading-category-name {
  display: flex;
  text-wrap: balance;
  text-align: left;
  margin: 5px;
  margin-right: auto;
  align-items: center;
  cursor: pointer;
}

/* Selection */
.case-container {
  display: flex;
  /* display: none; */
  flex-direction: row;
  flex-wrap: nowrap;
  /* justify-content: flex-start; */
  align-items: center;
  padding: 5px;
  margin: 5px;
  border-radius: 20px;
  max-width: 700px;
  border: solid;
  width: auto;
  cursor: pointer;
}

.case-number {
  font-size: 1rem;
  width: 2ch;
  text-align: center;
  margin-right: 0.1rem;
  margin-left: 0.1rem;
}

.case-number-wide {
  width: 3ch;
}

.img-case-container {
  transition: transform 0.5s ease-in-out;
  transform-style: preserve-3d;
  position: relative;
  display: flex;
  flex-shrink: 1;
  height: 100px;
  aspect-ratio: 1;
  cursor: pointer;
}

.img-case {
  height: 100%;
  width: 100%;
  /* height: 98px; */
  backface-visibility: hidden;
}

.img-case.front {
  transform: rotateY(0deg);
}

.img-case.back {
  position: absolute;
  transform: rotateY(180deg) translateX(+10%);
}

.algorithm {
  flex-grow: 1;
  flex-shrink: 1;
  /* height: 110px; */
  height: 100%;
  display: flex;
  font-size: 1.4rem;
  text-align: center;
  vertical-align: middle;
  justify-content: flex-start;
  /* margin: auto; */
}

.case-container:hover .img-edit-trash {
  visibility: visible;
}
.case-container:hover .flip-image {
  visibility: visible;
}

.img-edit-trash {
  /* width: 100%; */
  height: 24px;
  visibility: hidden;
  cursor: pointer;
  margin-top: auto;
  margin-bottom: auto;
}

.flip-image {
  transition: transform 0.4s ease-in-out;
  height: 24px;
  visibility: hidden;
  cursor: pointer;
  margin-top: auto;
  margin-bottom: auto;
}

.div-algorithm {
  /* justify-content: center; */
  /* align-items: center; */
  font-weight: bold;
  text-wrap: pretty;
  flex-grow: 1;
  text-align: center;
  vertical-align: middle;
  line-height: normal;
  margin: auto;
  margin-left: 6px;
}

.btn-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Side Buttons */
#side-container {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  position: sticky;
  top: 0;
  background-color: var(--color-background);
  /* background-color: #2bff88; */
  padding: 5px;
  border-bottom: dotted;
}

.side-button {
  cursor: pointer;
  padding: 0px;
  width: 32px;
  border-radius: 50%;
  margin: 2px;
}

.side-img {
  /* width: 80%;
  height: 80%; */
  width: 100%;
  height: 100%;
}

.btn-edit,
.btn-trash {
  flex-shrink: 0;
  margin: 5px;
  width: 20px;
}

.btn-settings-train,
.btn-settings-select {
  display: inline-block;
  /* width: 40px; */
  margin: auto;
}

/* Change Mode Button */
#change-mode {
  margin-left: auto;
  font-size: 1rem;
  padding: 0.4rem;
  border-radius: 10px;
  cursor: pointer;
  width: fit-content;
  align-items: center;
  border: solid;
  border-color: var(--color-img);
}

.window-train {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* margin-top: 5px; */
  /* border-top: dotted; */
}

#overlay {
  z-index: 2;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100lvh;
  background: var(--color-overlay);
  opacity: 40%;
  display: none;
  cursor: pointer;
}

/* #info-container {
  display: none;
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: 80%;
  max-width: 500px;
  padding: 20px;
  background: #4158d0;
  border-radius: 20px;
  display: none;
} */

/* Trash */
/* #trash-container {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: 80%;
  max-height: 90%;
  max-width: 500px;
  padding: 20px;
  background: #4158d0;
  border-radius: 20px;
  overflow: auto;
  display: none;
} */

* {
  box-sizing: border-box;
}

.popup-container {
  /* z-index: 3; */
  /* position: fixed; */
  padding: 0px 20px 20px 20px;
  background: var(--color-popup);
  border-radius: 20px;
  color: var(--color-text);
  border: none;
  max-width: 600px;
  /* box-shadow: 0 0 #0000, 0 0 #0000, 0 25px 50px -12px rgba(0, 0, 0, 0.25); */
  /* overflow: auto; */
  /* display: none; */

  /* left: 0; */
  /* right: 0; */
  /* margin-inline: max(20px, 50svw - 600px/2); */
  /* max-width: 600px; */

  /* min-width: min(90dvw, 350px); */

  /* top: 10px; */
  /* max-height: calc(100svh - 40px - 20px); */

  /* margin-top: 1rem;
  margin-bottom: 1rem; */
}

.popup-container::backdrop {
  background-color: grey;
  opacity: 50%;
  /* backdrop-filter: blur(10px); */
}

#loading-screen {
  position: fixed;
  left: 0;
  top: 0;
  background-color: var(--color-background);
  z-index: 999;
  /* width: 100dvw;
  height: 100dvh; */
}

/* #popup-change-state {
  
} */

.radio-state {
  margin-top: 1.7rem;
  margin-bottom: 1.7rem;
  transform: scale(2);
}

.label-state {
  font-size: 1.5rem;
  border-radius: 0.7rem;
  padding: 0.5rem;
  margin-left: 0.5rem;
}

#loading-screen {
  display: block;
  top: 0;
  left: 0;
  height: 100lvh;
  width: 100lvw;
  max-width: 100lvw;
  max-height: 100lvh;
  margin: 0;
  padding: 0;
}

.trash-element-container {
  display: flex;
  flex-direction: row;
}

.img-case-trash {
  width: 100%;
}

.img-container-trash {
  width: 100px;
  margin: 20px 0px;
  /* cursor: pointer; */
}

.case-number-trash {
  font-size: 2rem;
  margin: 20px 0px;
  text-align: center;
  vertical-align: middle;
  line-height: 100%;
}

.btn-recover {
  border-radius: 10px;
  padding: 10px;
  font-size: 2rem;
  cursor: pointer;
}

/* Edit Algoritm */
/* #editalg-container { */
/* display: none; */
/* } */

#editalg-text {
  font-size: 1.7rem;
  text-align: center;
}

#editalg-img-container {
  width: 110px;
  margin-bottom: 10px;
  margin: 0 auto;
}

#editalg-img {
  width: 100%;
  margin-top: 15px;
}

.editalg-listentry {
  text-align: center;
  border: solid;
  border-radius: 8px;
  margin: 5px 0px;
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  cursor: pointer;
}

.editalg-listentry,
#editalg-customalg {
  font-size: 1rem;
}

#editalg-customalg::placeholder {
  font-size: 0.8rem;
  color: rgb(255, 255, 255);
}

#input-export,
#editalg-customalg {
  color: var(--color-text);
  width: 100%;
  background: transparent;
  border: none;
  font-size: 1rem;
  text-align: center;
}

.update-cancel-buttons {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.btn-overlay {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  background: transparent;
  color: var(--color-text);
  border: solid;
  border-color: var(--color-img);
  padding: 3px 15px;
  border-radius: 8px;
  margin: 0 3px;
  cursor: pointer;
}

.img-cancel {
  filter: var(--filter-black);
}

button[popovertarget] {
  font: inherit;
  color: var(--color-img);
  cursor: pointer;
}

/* Train Settings */
/* #div-algs-to-learn { */
.div-checkbox-container-container {
  display: flex;
  justify-content: space-between;
}

.div-centering {
  display: flex;
  justify-content: space-around;
}

.checkbox-container {
  display: flex;
  flex-direction: column;
  margin-right: 10px;
  margin-left: 10px;
}

.checkbox-container > h3 {
  text-wrap: balance;
  margin-bottom: 1px;
}

/* #train-cases-container { */
/* display: none;
  flex-direction: column;
  max-width: 400px;
  margin-inline: max(20px, 50svw - 400px/2); */
/* } */

#select-settings-container > h2,
#train-settings-container > h2,
#welcome-container > h2,
#welcome-container-train > h2 {
  margin: 20px 0px 0px 0px;
}

.checkbox {
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  margin: 5px;
  cursor: pointer;
}

.checkbox-learning {
  background-color: var(--color-learning);
  color: var(--color-text-inverted);
}
.checkbox-finished {
  background-color: var(--color-finished);
  color: var(--color-text-inverted);
}

.checkbox__input {
  display: none;
}

.checkbox__box {
  width: 1.25em;
  height: 1.25em;
  border: 2px solid #cccccc;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.checkbox__box_learning {
  /* border-color: var(--color-text-inverted); */
  background-color: var(--color-background);
}
.checkbox__box_finished {
  /* border-color: var(--color-text-inverted); */
  background-color: var(--color-background);
}

.checkbox__box::after {
  content: "\2714";
  color: white;
  transform: scale(0);
  transition: transform 0.15s;
}

.checkbox__input:checked + .checkbox__box {
  background: #2266dc;
  border-color: #2266dc;
}

.checkbox__input:checked + .checkbox__box::after {
  transform: scale(1);
}

.checkbox:has(.checkbox__input:disabled) {
  opacity: 30%;
}

/* Train cases */
/* #train-cases-container {
  display: block;
} */

#scramble-container {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  margin-bottom: 20px;
  max-width: 800px;
}

/* #scramble-container > * {
  display: flex;
} */

#scramble-container > img {
  width: 30px;
}

#scramble {
  display: flex;
  justify-content: space-around;
  font-size: 1.5rem;
  text-align: center;
  margin: 5px;
}

.btn-next-prev {
  border-radius: 50%;
}

.div-hint-img {
  /* display: flex; */
  /* display: none; */
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.div-twisty-player {
  display: block;
  position: relative;
}

twisty-player {
  width: 200px;
  height: calc(200px / 0.813);
  /* height: 320px; */
  /* aspect-ratio: 0.813; */
}

.btn-reset-player-view {
  filter: var(--filter-img);
  width: 30px;
  position: absolute;
  cursor: pointer;
  right: 0;
  top: 0;
}

#hint-img {
  width: 150px;
}

#loading-case {
  /* width: 32px;
  height: 32px; */
  position: absolute;
  /* left: 59px;
  top: 63; */
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  margin: auto;
}

#hint-container {
  display: flex;
  justify-content: center;
  border: solid;
  border-radius: 10px;
  margin-top: 20px;
  font-size: 1.5rem;
  width: min(90%, 400px);
  padding-top: 20px;
  padding-bottom: 20px;
  text-align: center;
  cursor: pointer;
  border-color: var(--color-img);
}

#hint-placeholder {
  display: flex;
  /* display: none; */
}

twisty-alg-viewer {
  /* Display none by default because loading of twisty player may fail
  So the element may not be accessable later */
  display: none;
  color-scheme: dark;
  width: 100%;
  justify-content: center;
}

twisty-alg-wrapper-elem {
  width: 100%;
}

twisty-alg-viewer .wrapper {
  display: none;
}

.twisty-alg-current-move {
  background-color: rgb(255, 0, 0);
  color: white;
}

/* #btn-next-scramble {
  width: 50px;
} */

#btn-next-scramble:hover {
  cursor: pointer;
}

.select-group {
  font-size: 1rem;
  background-color: var(--color-background);
  border: solid;
  border-radius: 10px;
  border-color: var(--color-img);
  padding: 5px;
  color: var(--color-text);
}
.select-hint option,
.select-group option {
  background-color: var(--color-background);
}
.select-hint:hover,
.select-group:hover {
  background-color: var(--color-btn-hover);
}

.select-hint {
  display: flex;
  font-size: 1rem;
  background-color: var(--color-background);
  border: solid;
  border-radius: 10px;
  border-color: var(--color-img);
  padding: 5px;
  /* margin: auto; */
  margin-top: 5px;
  margin-bottom: 0px;
  margin-left: 5px;
  color: var(--color-text);
}

.div-select-hint {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
}

#training-active-cases-info {
  cursor: pointer;
  text-decoration-line: underline;
}

.animation-blink {
  animation: blinker 800ms linear infinite;
}
@keyframes blinker {
  50% {
    background-color: white;
    color: black;
  }
}

#debug-info {
  display: block;
  font-size: 1rem;
  text-align: center;
  text-wrap: pretty;
}

.img-instructions {
  margin-left: auto;
  margin-right: auto;
  /* display: flex;
  justify-content: center; */
  border: solid white 6px;
  border-radius: 35px;
  padding: 13px;
  /* width: 200px; */
  /* width: 80dvw; */
  width: min(380px, 90dvw);
}

#btn-show-hide-debug-info {
  font-size: 1rem;
  padding: 0.5rem;
  background-color: transparent;
  border: none;
  border-radius: 5px;
  size: 50px;
  cursor: pointer;
  color: var(--color-text);
}
/* .side-button:hover {
  box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24),
    0 17px 50px 0 rgba(0, 0, 0, 0.19);
} */

.btn-change-state-alg {
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-style: solid;
  border-radius: 0.6rem;
  border-color: var(--color-img);
}

.btn-delete {
  background-color: darkred;
  display: inline-flexbox;
  margin: auto;
  margin-top: 1rem;
}

.editalg-listentry:hover,
.btn-change-state-alg:hover,
#change-mode:hover,
#change-mode:focus,
.side-button:hover,
.side-button:focus,
.btn-overlay:hover,
.btn-overlay:focus,
#hint:hover,
#hint:focus,
.btn-next-prev:hover,
.btn-next-prev:focus {
  /* background-color: var(--color-btn-hover); */
  -webkit-transform: scale(1.03);
  -ms-transform: scale(1.03);
  transform: scale(1.03);
  transition: 0.2s ease;
}
/* .img-case-container:hover,
.img-case-container:focus, */
.case-container:hover,
.case-container:focus,
.img-edit-trash:hover {
  -webkit-transform: scale(1.04);
  -ms-transform: scale(1.04);
  transform: scale(1.04);
  transition: transform 0.3s ease;
}

.flip-image:hover {
  transform: scaleX(-1);
}

.rotate-arrow {
  transform: rotate(90deg);
}

.acessibility-label {
  font-size: 0.8rem;
  padding-right: 0.5rem;
}

.container-select-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

#timer {
  font-size: 2rem;
  margin: 1rem;
}

.btn-change-learing-state {
  display: flex;
  align-items: center;
  /* height: calc(1rem + 2 * 5px - 2 * 2px); */
  height: 1.2rem;
  margin-left: 0.2rem;
  margin-right: 0.2em;
  /* margin-top: 2px;
  margin-bottom: 2px; */
  margin-top: auto;
  margin-bottom: auto;
  /* margin: 5px 3px 5px 3px; */
  cursor: pointer;
}

.filter-unlearned {
  filter: var(--filter-white);
}
.filter-learning {
  filter: var(--filter-learning);
}
.filter-finished {
  filter: var(--filter-finished);
}

.div-press-me {
  display: block;
  position: absolute;
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-text);
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  /* // Centering does not work
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); */
  padding: 3px;
  border-radius: 10px;
}

.div-press-me-train {
  display: block;
  position: absolute;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-text);
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px;
  border-radius: 20px;
}

/* -----------------------------   Popover   --------------------------------- */

[popover] {
  /* position-anchor: --my-anchor; */
  font: inherit;
  position-anchor: inherit;
  margin: 0;
  padding: 1ch;
  inset: auto;
  /* top: anchor(bottom);
  right: anchor(center); */

  inline-size: max-content; /* shrink-to-fit its content */
  border-radius: 10px;
}

[popover-position="bottom-left"] {
  position-area: bottom left;
}
[popover-position="bottom-right"] {
  position-area: bottom right;
}
[popover-position="bottom-center"] {
  position-area: bottom center;
}
[popover-position="bottom-center-left"] {
  top: anchor(bottom);
  left: anchor(center);
  transform: translateX(-65%);
}
[popover-position="bottom-center-right"] {
  top: anchor(bottom);
  left: anchor(center);
  transform: translateX(-45%);
}
#popover-info {
  overflow: visible;
}
#popover-info::before {
  content: "";
  position: relative;
  top: -15px;
  left: 10px;
  border-width: 10px 10px 0 0;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

/* -----------------------------   Feedback   --------------------------------- */

.feedback-text {
  display: flex;
  background: transparent;
  color: var(--color-text);
  font-size: 1.2rem;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  margin-bottom: 5px;
  border-radius: 5px;
}

.feedback-text::placeholder {
  font-size: 1.2rem;
}

textarea {
  /* resize: none; */
  height: 30ex;
  max-width: 100%;
  max-height: 90dvh;
}

/* -----------------------------   Toggle Switch   --------------------------------- */
.switch-container {
  display: block;
  margin-bottom: 0.8rem;
  /* position: relative; */
}

.switch {
  display: flex;
  position: relative;
  width: 200px;
  /* height: 50px; */
  /* background: transparent; */
  overflow: hidden;
  align-items: center;
  justify-content: space-around;
  margin: auto;
}

.switch input {
  display: none;
}

.switch label {
  flex: 1;
  text-align: center;
  line-height: 4ch;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  z-index: 1;
  color: var(--color-text);
  opacity: 0.4;
  transition: opacity 150ms;
}

.switch input:checked + label {
  /* color: #000; */
  /* color: var(--color-text); */
  opacity: 1;
}

.indicator {
  position: absolute;
  bottom: 0;
  height: 4px;
  width: 50%; /* Matches half of the switch width */
  background-color: var(--color-text);
  transition: transform 150ms;
  left: 0; /* Start from the left */
}

#switch-left-id:checked ~ .indicator {
  transform: translateX(0); /* No movement for "Left" */
}

#switch-right-id:checked ~ .indicator {
  transform: translateX(100%); /* Moves to the "Right" */
}

/* -----------------------------   Loader   --------------------------------- */

.loader {
  display: flex;
  width: 32px;
  height: 32px;
  margin: auto;
  position: relative;
  top: 0px;
  left: 0px;
}
.loader:before {
  content: "";
  width: 32px;
  height: 5px;
  background: #000;
  opacity: 0.25;
  position: absolute;
  top: 42px;
  left: 0;
  border-radius: 50%;
  animation: shadow 0.5s linear infinite;
}
.loader:after {
  content: "";
  width: 100%;
  height: 100%;
  background: #fff;
  animation: bxSpin 0.5s linear infinite;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 4px;
}
@keyframes bxSpin {
  17% {
    border-bottom-right-radius: 3px;
  }
  25% {
    transform: translateY(9px) rotate(22.5deg);
  }
  50% {
    transform: translateY(18px) scale(1, 0.9) rotate(45deg);
    border-bottom-right-radius: 40px;
  }
  75% {
    transform: translateY(9px) rotate(67.5deg);
  }
  100% {
    transform: translateY(0) rotate(90deg);
  }
}

@keyframes shadow {
  0%,
  100% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1.2, 1);
  }
}

@keyframes bxSpin {
  17% {
    border-bottom-right-radius: 3px;
  }
  25% {
    transform: translateY(9px) rotate(22.5deg);
  }
  50% {
    transform: translateY(18px) scale(1, 0.9) rotate(45deg);
    border-bottom-right-radius: 40px;
  }
  75% {
    transform: translateY(9px) rotate(67.5deg);
  }
  100% {
    transform: translateY(0) rotate(90deg);
  }
}

@keyframes shadow {
  0%,
  100% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1.2, 1);
  }
}

/* -----------------------------   Data-tooltip   --------------------------------- */

[data-tooltip] {
  position: relative;
  cursor: pointer;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 115%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: max-content;
}

/* -----------------------------   Media Query   --------------------------------- */

/* Media Query */
@media (max-width: 100em) {
  .img-case-container {
    height: 70px;
  }
  .algorithm {
    font-size: 1rem;
  }
  .btn-edit,
  .btn-trash {
    width: 15px;
  }
  .heading-category-name {
    font-size: 1rem;
  }
  /* .img-case {
    height: 68px;
  } */
  .img-collapse-category {
    height: 25px;
    width: 25px;
  }
  .flip-image,
  .img-edit-trash {
    /* height: 18px; */
    height: 20px;
  }
  .div-press-me {
    font-size: 1.3rem;
  }
}
@media (min-width: 40em) {
  .category-container {
    display: flex;
    flex-direction: row;
  }
  .case-container {
    width: fit-content;
  }
  #scramble {
    font-size: 3rem;
  }
  #scramble-container > img {
    width: 45px;
  }
  #hint-img {
    width: 200px;
  }
  twisty-player {
    width: 255px;
    height: calc(255px / 0.813);
  }
  .select-group {
    font-size: 1.5rem;
  }
  #hint {
    font-size: 2rem;
  }
  .editalg-listentry {
    font-size: 1.5rem;
  }
  #input-export,
  #editalg-customalg {
    font-size: 1.5rem;
  }
  #editalg-customalg::placeholder {
    font-size: 1rem;
  }
  #change-mode {
    font-size: 1.5rem;
  }
  .container-select-group {
    flex-direction: row;
  }
  .acessibility-label {
    font-size: 1.2rem;
  }
  .loader {
    width: 48px;
    height: 48px;
  }
  .loader:before {
    width: 48px;
    top: 60px;
  }
  .heading-category-name {
    margin-right: 5px;
  }
  /* .img-instructions {
    width: 400px;
  } */
  .div-press-me-train {
    font-size: 3rem;
  }
  /* .side-img {
    width: 100%;
    height: 100%;
  } */
  .side-button {
    width: 40px;
    /* margin: 5px; */ /* If uncommented, settings button is no longer centered */
  }
  .btn-change-state-alg {
    font-size: 1.3rem;
  }
}

@media (pointer: coarse) {
  .flip-image,
  .img-edit-trash {
    visibility: visible;
  }
}

#settings-active-cases-info {
  margin: auto;
  width: 50%;
  padding-top: 10px;
}

/* --- Keep at the end of .css file --- */
.display-none {
  display: none;
}
