@tailwind base;
@tailwind components;
@tailwind utilities;

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
  body {
    color: white;
    background: #1c1c1c;
  }
}

#modal-root {
  display: flex;
  justify-content: center;
}

.prevent-scroll {
  overflow: hidden;
}

.modal {
  background: #333333;
  width: 100%;
  height: 100%;
  top: 100%;
  transition: top 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close {
  text-shadow: 0 1px 12px #000;
  font-size: 2rem;
}

.modal-flavor-text {
  text-shadow: 0 1px 2px #000;
}

.modal.open {
  top: 0;
}

.search-placeholder .card-container > .card {
  @apply rounded-md;
  position: absolute; 
  width: 120px;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease-in-out;
}

/*
  CARD POSITIONING
*/
.search-placeholder .card:nth-child(1) {
  left: 50%;
  transform: rotate(-2deg) translate(-95%, -55%);
}
.search-placeholder .card:nth-child(2) {
  left: 50%;
  transform: rotate(-1.2deg) translate(-85%, -55%);
}
.search-placeholder .card:nth-child(3) {
  left: 55%;
  transform: rotate(-1deg) translate(-90%, -55%);
}
.search-placeholder .card:nth-child(4) {
  left: 60%;
  transform: translate(-85%, -53%);
}
.search-placeholder .card:nth-child(5) {
  left: 65%;
  transform: rotate(2deg) translate(-80%, -50%);
}
/*
  END: CARD POSITIONING
*/

/*
  CARD POSITIONING ON HOVER OF CONTAINER
*/
.card-container:hover .card:nth-child(1) {
  left: 50%;
  transform: rotate(-2deg) translate(-105%, -54%);
}
.card-container:hover .card:nth-child(2) {
  left: 50%;
  transform: rotate(-1.2deg) translate(-90%, -56%);
}
.card-container:hover .card:nth-child(3) {
  left: 55%;
  transform: rotate(-1deg) translate(-88%, -54%);
}
.card-container:hover .card:nth-child(4) {
  left: 60%;
  transform: translate(-82%, -55%);
}
.card-container:hover .card:nth-child(5) {
  left: 65%;
  transform: rotate(2deg) translate(-78%, -55%);
}
/*
  END: CARD POSITIONING ON HOVER OF CONTAINER
*/

.spinner {
  display: inline-block;
  width: 80px;
  height: 80px;
}

.spinner:after {
  content: " ";
  display: block;
  width: 64px;
  height: 64px;
  margin: 8px;
  border-radius: 50%;
  border: 6px solid #fff;
  border-color: #fff transparent #fff transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}