/* animation class goes here */
.rotate {
  animation: rotate 10s linear infinite;
  -webkit-animation: rotate 10s linear infinite;
  -moz-animation: rotate 10s linear infinite;
}

@keyframes rotate1 {
  100% {
    transform: rotate(1turn);
  }
}

@-webkit-keyframes rotate1 {
  100% {
    transform: rotate(1turn);
  }
}

@-moz-keyframes rotate1 {
  100% {
    transform: rotate(1turn);
  }
}

.border-loop {
  z-index: 0;
  overflow: hidden;
}

.border-loop::before {
  content: "";
  position: absolute;
  z-index: -2;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  background-color: #1a232a;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(
    transparent,
    rgba(170, 118, 255, 1),
    transparent 30%
  );
  animation: rotate1 2.5s linear infinite paused;
  -webkit-animation: rotate1 2.5s linear infinite paused;
  -moz-animation: rotate1 2.5s linear infinite paused;
  visibility: hidden;
}

.border-loop::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 1px;
  top: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  background: var(--box-gradient);
  border-radius: var(--border-radius);
}

.border-loop:hover::before {
  animation-play-state: running;
  -webkit-animation-play-state: running;
  -moz-animation-play-state: running;
  visibility: visible;
}

.border-loop-orange::before {
  background-image: conic-gradient(
    transparent,
    rgba(254, 190, 21, 1),
    transparent 30%
  );
}

@keyframes opacityChange {
  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

@-webkit-keyframes opacityChange {
  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

@-moz-keyframes opacityChange {
  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes rotate {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

@-moz-keyframes rotate {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes mymove {
  0% {
    background-position: 10% 0%;
  }

  50% {
    background-position: 91% 100%;
  }

  100% {
    background-position: 10% 0%;
  }
}

@-webkit-keyframes mymove {
  0% {
    background-position: 10% 0%;
  }

  50% {
    background-position: 91% 100%;
  }

  100% {
    background-position: 10% 0%;
  }
}

@-moz-keyframes mymove {
  0% {
    background-position: 10% 0%;
  }

  50% {
    background-position: 91% 100%;
  }

  100% {
    background-position: 10% 0%;
  }
}

#gearIcon:hover {
  animation: rotate 3s linear infinite;
}

@keyframes rotateSlow {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*------ gear icon ends here--------- */

/* 2.bell icon */
#bellIcon:hover {
  animation: shakeBell 0.5s ease-in-out infinite;
  display: inline-block;
}

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

  25% {
    transform: rotate(8deg);
  }

  50% {
    transform: rotate(-8deg);
  }

  75% {
    transform: rotate(5deg);
  }
}

/* 3.add icon rotation starts */
@keyframes rotate-forward {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(90deg);
  }
}

@keyframes rotate-back {
  from {
    transform: rotate(90deg);
  }

  to {
    transform: rotate(0deg);
  }
}

#addIcon {
  display: inline-block;
  transition: none;
}

.btn-icon:hover #addIcon {
  animation: rotate-forward 0.2s ease-out forwards;
}

.btn-icon:not(:hover) #addIcon {
  animation: rotate-back 0.2s ease-out forwards;
}

/* 4.arrow icon animation */

@keyframes arrow-glide {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }

  40% {
    transform: translate(30px, -30px);
    opacity: 1;
  }

  50% {
    opacity: 0;
    transform: translate(35px, -35px);
  }

  60% {
    opacity: 0;
    transform: translate(-15px, 15px);
  }

  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
}

/* ends (by john)*/

/* rotating animation for all modal close buttons  (by john)*/
@keyframes rotate-forward {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(90deg);
  }
}

@keyframes rotate-back {
  from {
    transform: rotate(90deg);
  }

  to {
    transform: rotate(0deg);
  }
}

/* Apply the animation to all modal close buttons */
.btn-close:hover {
  animation: rotate-forward 0.2s ease-out forwards;
}

/* Add hover effect for rotation */
.btn-close:not(:hover) {
  animation: rotate-back 0.2s ease-out forwards;
}

/* ends (by john) */

/* dashboard glide animation starts here * (by john)*/
.glide {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
  transition: background-color 0.3s ease-in-out;
}
.hover-text {
  transition: transform 0.3s ease;
}

/* Hover animation for the button */
.glide:hover .ico-circle.ico-white i.bi-arrow-right {
  animation: glide-forward 0.4s ease-out 1;
  color: var(--secondary-color);
}

/* Hover animation for the text */
.glide:hover .hover-text {
  transform: translateX(8px); /* Move the text slightly to the right */
  transition: transform 0.3s ease;
}

/* Keyframes for the glide-forward animation */
@keyframes glide-forward {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  30% {
    transform: translateX(10px);
    opacity: 1;
  }
  50% {
    transform: translateX(20px);
    opacity: 0;
  }
  60% {
    transform: translateX(-10px);
    opacity: 0;
  }
  80% {
    transform: translateX(-5px);
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* dashboard  dashboard glide animation ends here * (by john) */
@keyframes move-forward {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes slideaway {
  from {
    display: none;
  }

  to {
    position: relative;
  }
}
