/* ================================= main start ================================= */
.main {
  display: flex;
  align-items: center;
  justify-content: center;
}

/*==========  playfields start  ==========*/
.playfields {
  display: flex;
  justify-content: center;
  flex: 1;
  position: relative;
  height: -webkit-fill-available;
  align-items: center;
  max-width: 70rem;
  width: 100%;
  margin-bottom: 0;
}

.playfield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 70 / 70;
  width: calc(100% / 3.3);
  display: flex;
}

.hint-container.hide {
  font-family: sans-serif;
  position: absolute;
  top: 0;
  left: 1750%;
  opacity: 0;
}

.hint-container {
  font-family: sans-serif;
  position: absolute;
  top: 5.5%;
  left: 175%;
  opacity: 1;
  transition: opacity 350ms;
  user-select: none;
}

.mobile .hint-container {
  top: 145%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 150ms;
}

.hint-color {
  display: flex;
  flex-wrap: wrap;
  width: max-content;
  align-items: center;
  margin-bottom: 10px;
  transition: all 250ms;
}

.hint-color:last-child {
  margin-bottom: 0px;
}

.hint-elem-color {
  width: 35px;
  height: 35px;
  border: 1px dashed;
  margin-right: 7px;
  background-color: transparent;
  position: relative;
}

.hint-elem-plug {
  width: 50%;
  height: 50%;
  position: absolute;
  bottom: 0;
  left: 0;
}

.hint-elem-static-text {
  font-size: 18px;
}

.hint-elem-text {
  text-transform: uppercase;
  color: #db0402;
  font-size: 18px;
}

.symmetric .hint-elem-text {
  color: #00aa00;
}

.hint-blue .hint-elem-plug {
  background-color: #1d1f38;
}

.hint-orange .hint-elem-plug {
  background-color: #ff4e00;
}

.hint-teal .hint-elem-plug {
  background-color: #399faa;
}

.hint-gray .hint-elem-plug {
  background-color: #edddcc;
}

.hint-blue .hint-elem-color {
  border: 1px dashed #1d1f38;
}

.hint-orange .hint-elem-color {
  border: 1px dashed #ff4e00;
}

.hint-teal .hint-elem-color {
  border: 1px dashed #399faa;
}

.hint-gray .hint-elem-color {
  border: 1px dashed #edddcc;
}

.symmetric.hint-blue .hint-elem-color {
  background-color: #1d1f38;
  border: 1px solid #1d1f38;
}

.symmetric.hint-orange .hint-elem-color {
  background-color: #ff4e00;
  border: 1px solid #ff4e00;
}

.symmetric.hint-teal .hint-elem-color {
  background-color: #399faa;
  border: 1px solid #399faa;
}

.symmetric.hint-gray .hint-elem-color {
  background-color: #edddcc;
  border: 1px solid #edddcc;
}

/*==========  playfields end  ==========*/

/*==========  tiles start  ==========*/
.tiles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 70 / 70;
  width: calc(100% / 3.3);
  display: flex;
}

.mobile .tiles {
  position: absolute;
  top: 79%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 70 / 70;
  width: calc(100% / 3.3);
  display: flex;
}

.tile {
  position: absolute;
  width: 29.76%;
  height: 29.76%;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
  cursor: default;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  /* border-radius: 3px;
  overflow: hidden; */
}

.tile_2,
.drop-zone_2 {
  top: 0%;
  left: -44%;
}

.tile_7,
.drop-zone_7 {
  top: 50%;
  left: -44%;
}

.tile_4,
.drop-zone_4 {
  top: 100%;
  left: -44%;
}

.tile_5,
.drop-zone_5 {
  top: 122%;
  left: -3%;
}

.tile_1,
.drop-zone_1 {
  top: 122%;
  left: 50%;
}

.tile_8,
.drop-zone_8 {
  top: 122%;
  left: 103%;
}

.tile_3,
.drop-zone_3 {
  top: 83%;
  left: 9%;
  top: 100%;
  left: 144%;
}

.tile_9,
.drop-zone_9 {
  top: 50%;
  left: 144%;
}

.tile_6,
.drop-zone_6 {
  top: 0%;
  left: 144%;
}

/* ============ */
.mobile .tile_1 {
  top: 79%;
  left: 10%;
}

.mobile .tile_2 {
  top: 79%;
  left: 50%;
}

.mobile .tile_3 {
  top: 79%;
  left: 90%;
}

.mobile .tile_4 {
  top: 47%;
  left: 10%;
}

.mobile .tile_5 {
  top: 47%;
  left: 50%;
}

.mobile .tile_6 {
  top: 47%;
  left: 90%;
}

.mobile .tile_7 {
  top: 15%;
  left: 10%;
}

.mobile .tile_8 {
  top: 15%;
  left: 50%;
}

.mobile .tile_9 {
  top: 15%;
  left: 90%;
}

/*==========  tiles end  ==========*/

/*==========  tiles start  ==========*/
.drop-zones {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 70 / 70;
  width: calc(100% / 3.3);
  display: flex;
  pointer-events: none;
}

.drop-zone {
  position: absolute;
  width: 27.14%;
  height: 27.14%;
  transform: translate(-50%, -50%) scale(1);
  cursor: pointer;
}

/*==========  tiles end  ==========*/

path,
polygon {
  pointer-events: all;
  cursor: pointer;
}

path[fill="transparent"][stroke="transparent"] {
  pointer-events: none;
}

path[fill="transparent"],
path[stroke="transparent"] {
  pointer-events: none;
}

.mobile .playfield {
  height: 67%;
}

.tile {
  -webkit-tap-highlight-color: transparent;
  /* removes gray backlight on iOS */
}

.playfield {
  -webkit-tap-highlight-color: transparent;
  /* removes gray backlight on iOS */
}

/* Main unit */

body,
.wrapper,
.main,
.playfields,
.tiles,
.tile,
.tile svg {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  /* or none -try both */
}

/* Allow selection only where text is really needed */
.you-win,
.modal,
.how-to-play-modal,
.footer-copy,
p,
.hint-elem-text,
.pagination-text {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default;
}

/*================================*/
#resize-preloader {
  position: fixed;
  top: 0;
  left: -101%;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  /* Dark background in QuintaPaths style */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
}

#resize-preloader.show {
  left: 0%;
  opacity: 1;
}

.puzzle-container {
  display: flex;
  gap: 20px;
}

.puzzle-piece {
  width: 40px;
  height: 40px;
  background: transparent;
  animation: assemble 1.5s infinite ease-in-out;
}

/* Delay for each of the 5 elements */
.puzzle-piece:nth-child(1) {
  animation-delay: 0.1s;
}

.puzzle-piece:nth-child(2) {
  animation-delay: 0.2s;
}

.puzzle-piece:nth-child(3) {
  animation-delay: 0.3s;
}

.puzzle-piece:nth-child(4) {
  animation-delay: 0.4s;
}

.puzzle-piece:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes assemble {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(90deg);
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .mobile.wrapper.challenge-1,
  .mobile.wrapper.challenge-2,
  .mobile.wrapper.challenge-3 {
    height: 80dvh;
    padding: 0;
  }

  .mobile.wrapper .main {
    height: 88dvh;
  }

  .mobile.wrapper.mobile.challenge-2 .main {
    height: 81dvh;
  }
}

@media (max-width: 767px) {
  .mobile.wrapper .main {
    height: 88dvh;
  }
}

.mobile.wrapper .playfield {
  top: 0%;
  left: 50%;
  transform: translate(-50%, 0%);
  display: block;
}

.mobile .tiles {
  transform: translate(-50%, 0%);
  top: 51%;
}

.mobile.challenge-2 .header {
  margin-bottom: 90px;
}

.mobile.challenge-1 .header,
.mobile.challenge-3 .header {
  margin-bottom: 50px;
}

.mobile .challenge-content.active {
  position: absolute;
  top: 0%;
  transform: translate(-50%, 0%);
  width: 100%;
  display: block;
  height: 50%;
  left: 50%;
}

.mobile.wrapper .playfield {
  display: block;
}

.mobile.wrapper .playfield {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
