html,
body {
  width: 100%;
  height: 100%;
  background-color: var(--dark-colour);
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  visibility: hidden;
}

.backgroundPanels {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  display: flex;
}

.leftPanel,
.rightPanel {
  width: 50%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
}

.leftPanel {
  border-right: 2px solid rgba(0, 0, 0, 0.1);
}

.rightPanel {
  background-color: rgba(255, 255, 255, 0.2);
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.cardHolder {
  width: 100%;
  height: 98%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  row-gap: 1vmin;
  margin-top: 1%;
}

.dummyCards {
  z-index: 0;
}

.card {
  aspect-ratio: 3 / 1.8;
  width: auto;
  height: 45%;
  padding: 0 2vmin;
  background: var(--light-colour);
  border-radius: 1vmin;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0.1vmin 0.2vmin,
    rgba(0, 0, 0, 0.3) 0px 0.35vmin 0.75vmin -0.15vmin,
    rgba(0, 0, 0, 0.2) 0px -0.15vmin 0px inset;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-card {
  z-index: 100;
  aspect-ratio: 3 / 1.8;
  width: auto;
  height: 45%;
  background: var(--dark-colour);
  filter: brightness(0.7);
  border-radius: 1vmin;
  border-top: 3px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.card p {
  font-size: 4vmin;
  text-align: center;
  text-wrap: balance;
  color: var(--black-colour);
}

.refreshBtn {
  height: 7.5%;
  width: auto;
  aspect-ratio: 1;
  border-radius: 100%;
  background-color: var(--dark-colour);
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0.1vmin 0.2vmin,
    rgba(0, 0, 0, 0.3) 0px 0.35vmin 0.75vmin -0.15vmin,
    rgba(0, 0, 0, 0.2) 0px -0.15vmin 0px inset;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  z-index: 9;
  margin-bottom: 1vmin;
}

.refreshBtn:hover {
  filter: brightness(1.25);
}

.refreshBtn svg {
  fill: var(--white-colour);
  width: 50%;
}

.counters {
  height: 100%;
  width: 95%;
  margin-left: 2.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  left: 0;
}

.counter {
  height: 100%;
  width: 20%;
  display: flex;
  flex-direction: column;
  row-gap: 2vmin;
  align-items: center;
  justify-content: center;
}

#counter-title-left,
#counter-title-right {
  color: var(--white-colour);
  font-size: 3vmin;
  font-weight: 200;
  margin-bottom: 2vmin;
  text-transform: uppercase;
}

.total {
  position: relative;
  background-color: var(--white-colour);
  height: 20%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 1;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0.1vmin 0.2vmin,
    rgba(0, 0, 0, 0.3) 0px 0.35vmin 0.75vmin -0.15vmin,
    rgba(0, 0, 0, 0.2) 0px -0.15vmin 0px inset;
  border-radius: 1vmin;
}

.total p {
  color: var(--black-colour);
  font-weight: 900;
  font-size: 12.5vmin;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  margin-bottom: 0.2vmin;
  pointer-events: none;
}

.totalInnerPanel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;
  cursor: pointer;
}

.totalInnerPanel .topPanel {
  width: 100%;
  height: 50%;
  background-color: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 1vmin 1vmin 0 0;
}

.totalInnerPanel .btmPanel {
  width: 100%;
  height: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0 0 1vmin 1vmin;
}

.topPanel:hover {
  opacity: 0.8;
}
.btmPanel:hover {
  opacity: 0.8;
}

#selection-text {
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/*                                   PICKER                                   */
/* -------------------------------------------------------------------------- */

.picker-overlay {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  z-index: 9999;
  position: absolute;
  background-color: var(--dark-colour);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.picker-title {
  font-size: 2vmin;
  margin-bottom: 2vmin;
  color: var(--white-colour);
  text-transform: uppercase;
  font-weight: 600;
}

.picker-container {
  display: flex;
  flex-direction: column;
  height: fit-content;
  max-height: 85%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 2vmin;
  min-width: 30%;
  max-width: 90%;
  border-radius: 1vmin;
  border-top: 1px solid rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.picker-item {
  display: flex;
  padding: 2vmin;
  background-color: var(--light-colour);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  font-size: 1.75vmin;
  font-weight: 200;
  cursor: pointer;
}

.selected {
  background-color: var(--yellow-colour) !important;
}

.picker-item:hover {
  background-color: var(--white-colour);
}

.picker-item:first-of-type {
  border-radius: 1vmin 1vmin 0 0;
}

.picker-item:last-of-type {
  border-radius: 0 0 1vmin 1vmin;
}

/* -------------------------------------------------------------------------- */
/*                                 ANIMATIONS                                 */
/* -------------------------------------------------------------------------- */

/* Left card flies up and rotates −5° */
@keyframes slide-out-top-left {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-150vh) rotate(-50deg);
  }
}
.slide-out-top-left {
  animation: slide-out-top-left 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
}

/* Right card flies up and rotates +5° */
@keyframes slide-out-top-right {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-150vh) rotate(50deg);
  }
}
.slide-out-top-right {
  animation: slide-out-top-right 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
}

@keyframes slide-in-top-left {
  0% {
    transform: translateY(-150vh) rotate(-50deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}
.slide-in-top-left {
  animation: slide-in-top-left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slide-in-top-right {
  0% {
    transform: translateY(-150vh) rotate(50deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}
.slide-in-top-right {
  animation: slide-in-top-right 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* -------------------------------------------------------------------------- */
/*                              BUTTON TOOLTIP                                */
/* -------------------------------------------------------------------------- */

.button-tooltip {
  --b: 2em; /* triangle base */
  --h: 1em; /* triangle height */
  --p: 50%; /* triangle position */
  --r: 1vmin; /* border radius */
  --c: var(--light-colour);

  position: relative;
  z-index: 10;
  padding: 1.5vmin 2.5vmin;
  margin-bottom: 0.5vmin;
  border-radius: var(--r) var(--r) min(var(--r), 100% - var(--p) - var(--b) / 2)
    min(var(--r), var(--p) - var(--b) / 2) / var(--r);
  clip-path: polygon(
    0 100%,
    0 0,
    100% 0,
    100% 100%,
    min(100%, var(--p) + var(--b) / 2) 100%,
    var(--p) calc(100% + var(--h)),
    max(0%, var(--p) - var(--b) / 2) 100%
  );
  background: var(--c);
  border-image: conic-gradient(var(--c) 0 0) fill 0 / var(--r)
    calc(100% - var(--p) - var(--b) / 2) 0 calc(var(--p) - var(--b) / 2) / 0 0
    var(--h) 0;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 8px;
  animation: tooltip-bounce 1.5s ease-in-out infinite;
}

.button-tooltip p {
  color: var(--black-colour);
  font-size: 1.6vmin;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
}

@keyframes tooltip-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5vmin);
  }
}

/* Fade out animation for removal */
.button-tooltip.fade-out {
  animation: tooltip-fade-out 0.3s ease-out forwards;
}

@keyframes tooltip-fade-out {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-1vmin);
  }
}
