/* ==========================================================================
   KPilot Loading Screen
   Adapted from CodePen by George Hoqqanen (hoqqanen/zvqGEG)
   Aligned with KPilot Design System — navy/teal palette
   ========================================================================== */

#loading-page {
  align-items: center;
  background: linear-gradient(
    135deg,
    #f8fafc 0%,
    #eef2f7 50%,
    #e8edf4 100%
  );
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  transition: opacity 0.6s ease;
}

.loading-logo {
  margin-bottom: 2rem;
  animation: logo-fade-in 0.6s ease-out;
}

.loading-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

#phrase_box {
  display: flex;
  flex-flow: column;
  height: 150px;
  overflow: hidden;
  width: 300px;
}

#phrase_box svg {
  width: 100%;
  height: 100%;
}

#phrases {
  transition: transform 0.05s linear;
}

.loading-footer {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  animation: logo-fade-in 1s ease-out;
}

/* Checkmark circle fill animation */
@keyframes check-circle-fill {
  0% { opacity: 0; }
  10% { opacity: 1; }
  100% { opacity: 1; }
}

/* Checkmark color animation — navy when complete */
@keyframes check-fill-navy {
  0% { fill: #94a3b8; }
  10% { fill: #184470; }
  100% { fill: #184470; }
}

@keyframes logo-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Generate animation delays for each phrase (0-15) */
#loadingCheckCircleSVG-0 { animation: check-circle-fill 5s; animation-delay: -1.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-1 { animation: check-circle-fill 5s; animation-delay: -0.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-2 { animation: check-circle-fill 5s; animation-delay: 0.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-3 { animation: check-circle-fill 5s; animation-delay: 1.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-4 { animation: check-circle-fill 5s; animation-delay: 2.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-5 { animation: check-circle-fill 5s; animation-delay: 3.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-6 { animation: check-circle-fill 5s; animation-delay: 4.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-7 { animation: check-circle-fill 5s; animation-delay: 5.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-8 { animation: check-circle-fill 5s; animation-delay: 6.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-9 { animation: check-circle-fill 5s; animation-delay: 7.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-10 { animation: check-circle-fill 5s; animation-delay: 8.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-11 { animation: check-circle-fill 5s; animation-delay: 9.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-12 { animation: check-circle-fill 5s; animation-delay: 10.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-13 { animation: check-circle-fill 5s; animation-delay: 11.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-14 { animation: check-circle-fill 5s; animation-delay: 12.5s; fill: rgba(24,68,112,0.12); opacity: 0; }
#loadingCheckCircleSVG-15 { animation: check-circle-fill 5s; animation-delay: 13.5s; fill: rgba(24,68,112,0.12); opacity: 0; }

#loadingCheckSVG-0 { animation: check-fill-navy 5s; animation-delay: -1.5s; }
#loadingCheckSVG-1 { animation: check-fill-navy 5s; animation-delay: -0.5s; }
#loadingCheckSVG-2 { animation: check-fill-navy 5s; animation-delay: 0.5s; }
#loadingCheckSVG-3 { animation: check-fill-navy 5s; animation-delay: 1.5s; }
#loadingCheckSVG-4 { animation: check-fill-navy 5s; animation-delay: 2.5s; }
#loadingCheckSVG-5 { animation: check-fill-navy 5s; animation-delay: 3.5s; }
#loadingCheckSVG-6 { animation: check-fill-navy 5s; animation-delay: 4.5s; }
#loadingCheckSVG-7 { animation: check-fill-navy 5s; animation-delay: 5.5s; }
#loadingCheckSVG-8 { animation: check-fill-navy 5s; animation-delay: 6.5s; }
#loadingCheckSVG-9 { animation: check-fill-navy 5s; animation-delay: 7.5s; }
#loadingCheckSVG-10 { animation: check-fill-navy 5s; animation-delay: 8.5s; }
#loadingCheckSVG-11 { animation: check-fill-navy 5s; animation-delay: 9.5s; }
#loadingCheckSVG-12 { animation: check-fill-navy 5s; animation-delay: 10.5s; }
#loadingCheckSVG-13 { animation: check-fill-navy 5s; animation-delay: 11.5s; }
#loadingCheckSVG-14 { animation: check-fill-navy 5s; animation-delay: 12.5s; }
#loadingCheckSVG-15 { animation: check-fill-navy 5s; animation-delay: 13.5s; }

/* ==========================================================================
   Fallback Error (when Angular fails to bootstrap)
   ========================================================================== */

#jhipster-error {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

.error-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.error-fallback__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: #fffbeb;
  border: 1px solid #fde68a;
  margin-bottom: 1.5rem;
}

.error-fallback__code {
  font-size: 4rem;
  font-weight: 700;
  color: #184470;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.error-fallback__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.error-fallback__desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.6;
  max-width: 28rem;
  margin: 0 0 2rem;
}

.error-fallback__btn {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  background-color: #184470;
  border: 1px solid #184470;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: inherit;
}

.error-fallback__btn:hover {
  background-color: #0f2d4a;
  border-color: #0f2d4a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
