/* Ensure the video container allows for absolute positioning of tooltips */
/* I stole this css from: https://codepen.io/KaioRocha/pen/mdJWRmy */
[id$="-tooltip-container"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  aspect-ratio: 16/9;
}

.video-tooltip {
  position: absolute;
  /* Top and left will be set inline by JavaScript */
  z-index: 1000;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  padding: 30px;
  background-color: hsla(0 0 0 / 0.5);
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  border-radius: 7px;
}

.video-tooltip .container {
  position: relative;
  width: min(300px, 20vw);
  font-size: clamp(12px, 2vw, 14px); /* Added for responsive text */
}

.video-tooltip .tooltip-lens {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: shake cubic-bezier(0.36, 0.07, 0.19, 0.97) 1000ms forwards;
  animation-delay: 500ms; /* Reduced from 2000ms for quicker response */
}

.video-tooltip .ballon {
  width: 100%;
  background: #ffffff;
  border-radius: 5px;
  box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
  padding: 10px;
  animation: ballong cubic-bezier(0.68, -0.55, 0.27, 1.55) 500ms forwards;
}

/* Tool Tip Arrows */
.video-tooltip .ballon:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 30px;
  height: 30px;
  background: #ffffff;
  animation: ballongContentArrow cubic-bezier(0.68, -0.55, 0.27, 1.55) 500ms
    forwards;
  animation-delay: 200ms;
}

/* Left pointing arrow */
.video-tooltip .ballon.balloon-arrow-left::after {
  bottom: 30%;
  left: 1%;
  transform: translateX(-50%) rotate(45deg);
}

/* Right pointing arrow */
.video-tooltip .ballon.balloon-arrow-right::after {
  bottom: 30%;
  left: 100%;
  transform: translateX(-50%) rotate(45deg);
}

/* Up pointing arrow */
.video-tooltip .ballon.balloon-arrow-up::after {
  bottom: 90%;
  left: 50%;
  transform: translate(-50%) rotate(45deg);
}
/* END Tool Tip Arrows */

.video-tooltip .wrapper-content {
  position: relative;
  z-index: 99992;
  opacity: 0;
  animation: ballongContent cubic-bezier(0.68, -0.55, 0.27, 1.55) 500ms forwards;
  animation-delay: 250ms;
}

.video-tooltip .wrapper-content > .iconContainer {
  display: flex;
  justify-content: center;
}
.informationIconSpan {
  vertical-align: middle;
  font-size: 24px;
  font-weight: 500;
  color: #12822a;
}
.video-tooltip .wrapper-content p {
  position: relative;
  z-index: 30;
  font-family: sans-serif;
  color: black;
  font-size: 16px;
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

.video-tooltip .continue-btn {
    color: #ffffff;
    background: #12822a;
    border: none;
    padding: clamp(6px, 1vw, 9px);
    border-radius: 5px;
    cursor: pointer;
    font-family: sans-serif;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    width: min(75%, 180px);
}

.video-tooltip .continue-btn > .arrowContainer {
  display: inline-block;
  position: relative;
  margin-left: 5px;
}

@keyframes ballong {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ballongContentArrow {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes ballongContent {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .video-tooltip .container {
    width: min(220px, 40vw); /* Slightly larger percentage on smaller screens */
  }

  .video-tooltip .ballon {
    padding: clamp(8px, 2vw, 10px); /* Responsive padding */
  }
}
