/* Main Loading Overlay Styles - Used across the application */

/* Loading overlay for projects view - FULL SCREEN */
.projects-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.3s ease;
}

.projects-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.projects-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 50px;
  border-radius: 16px;
  background: var(--background-color);
  border: 2px solid var(--border-color);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  min-width: 300px;
}

.projects-loading-spinner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-color), transparent, var(--accent-color));
  animation: projectsSpinGlow 2s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.projects-loading-spinner::before {
  content: '';
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.projects-loading-spinner .material-icons-round {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 32px;
  line-height: 1;
  color: var(--accent-color);
  animation: projectsIconPulse 1.5s ease-in-out infinite;
}

.projects-loading-text {
  color: var(--text-color);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}

.projects-loading-subtext {
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
  animation: projectsTextFade 2s ease-in-out infinite;
}

@keyframes projectsSpinGlow {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.6);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  }
}

@keyframes projectsIconPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

@keyframes projectsTextFade {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.projects-loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.projects-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
  animation: projectsDotBounce 1.4s ease-in-out infinite;
}

.projects-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.projects-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes projectsDotBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-20px);
    opacity: 1;
  }
}

/* Generic loading overlay classes that can be reused */
.main-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.3s ease;
}

.main-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.main-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 50px;
  border-radius: 16px;
  background: var(--background-color);
  border: 2px solid var(--border-color);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  min-width: 300px;
}

.main-loading-spinner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-color), transparent, var(--accent-color));
  animation: mainSpinGlow 2s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.main-loading-spinner::before {
  content: '';
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-loading-spinner .material-icons-round {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 32px;
  line-height: 1;
  color: var(--accent-color);
  animation: mainIconPulse 1.5s ease-in-out infinite;
}

.main-loading-text {
  color: var(--text-color);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}

.main-loading-subtext {
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
  animation: mainTextFade 2s ease-in-out infinite;
}

@keyframes mainSpinGlow {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.6);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  }
}

@keyframes mainIconPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

@keyframes mainTextFade {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.main-loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.main-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
  animation: mainDotBounce 1.4s ease-in-out infinite;
}

.main-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.main-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes mainDotBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-20px);
    opacity: 1;
  }
}
