/* Loader Animation - Spike Roll */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.loader-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loader {
  position: relative;
  width: 50px;
  height: 30px;
  background-repeat: no-repeat;
  background-image: 
    linear-gradient(white 30px, transparent 0),
    linear-gradient(white 30px, transparent 0),
    linear-gradient(white 30px, transparent 0),
    linear-gradient(white 30px, transparent 0),
    linear-gradient(white 30px, transparent 0),
    linear-gradient(white 30px, transparent 0);
  background-position: 0px center, 10px center, 20px center, 30px center, 40px center, 50px center;
  animation: rikSpikeRoll 0.65s linear infinite alternate;
  filter: drop-shadow(0 0 6px #4ea8ff);
}

@keyframes rikSpikeRoll {
  0% {
    background-size: 6px 3px;
  }
  16% {
    background-size:
      6px 30px,
      6px 3px,
      6px 3px,
      6px 3px,
      6px 3px,
      6px 3px;
  }
  33% {
    background-size:
      6px 20px,
      6px 30px,
      6px 3px,
      6px 3px,
      6px 3px,
      6px 3px;
  }
  50% {
    background-size:
      6px 10px,
      6px 20px,
      6px 30px,
      6px 3px,
      6px 3px,
      6px 3px;
  }
  66% {
    background-size:
      6px 3px,
      6px 10px,
      6px 20px,
      6px 30px,
      6px 3px,
      6px 3px;
  }
  83% {
    background-size:
      6px 3px,
      6px 3px,
      6px 10px,
      6px 20px,
      6px 30px,
      6px 3px;
  }
  100% {
    background-size:
      6px 3px,
      6px 3px,
      6px 3px,
      6px 10px,
      6px 20px,
      6px 30px;
  }
}

/* Page transition loader */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.page-transition-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Top loading progress bar */
.top-progress-bar {
  display: none !important; /* Hide the top progress bar */
}

/* Telegram specific loader */
.telegram-loader-overlay {
  background-color: rgba(0, 0, 0, 0.85);
}

.telegram-loader-text {
  font-size: 16px;
  margin-top: 15px;
  color: #ffffff;
}

/* Styles for Telegram WebApp */
.telegram-webapp {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Back Button Style */
.back-button {
  position: absolute;
  top: 20px;
  left: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Slim loading indicator for actions like form submissions */
.slim-loader {
  position: relative;
  width: 40px;
  height: 20px;
  background-repeat: no-repeat;
  background-image: 
    linear-gradient(white 20px, transparent 0),
    linear-gradient(white 20px, transparent 0),
    linear-gradient(white 20px, transparent 0),
    linear-gradient(white 20px, transparent 0);
  background-position: 0px center, 10px center, 20px center, 30px center;
  animation: rikSpikeRollSmall 0.65s linear infinite alternate;
  filter: drop-shadow(0 0 4px #4ea8ff);
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes rikSpikeRollSmall {
  0% {
    background-size: 5px 3px;
  }
  25% {
    background-size:
      5px 20px,
      5px 3px,
      5px 3px,
      5px 3px;
  }
  50% {
    background-size:
      5px 8px,
      5px 20px,
      5px 3px,
      5px 3px;
  }
  75% {
    background-size:
      5px 3px,
      5px 8px,
      5px 20px,
      5px 3px;
  }
  100% {
    background-size:
      5px 3px,
      5px 3px,
      5px 8px,
      5px 20px;
  }
} 