/* ============================================================
   Staff Portal — AIIB Loading Animation (Bank → Airplane → Hotel)
   ============================================================ */

/* Loading overlay backdrop */
.aiib-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 32px;
}

/* The flight scene container */
.aiib-loading-scene {
  position: relative;
  width: 320px;
  height: 120px;
  overflow: hidden;
}

/* Dotted flight path */
.aiib-loading-path {
  position: absolute;
  top: 50%;
  left: 50px;
  right: 50px;
  height: 0;
  border-top: 2px dashed rgba(197, 165, 114, 0.4);
  transform: translateY(-50%);
}

/* Bank building on the left (starting point) */
.aiib-loading-bank {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 30px;
  color: rgba(255, 255, 255, 0.85);
  z-index: 2;
  animation: aiibBankPulse 2.5s ease-in-out infinite;
}

/* Airplane */
.aiib-loading-plane {
  position: absolute;
  top: 50%;
  left: 40px;
  transform: translateY(-50%);
  font-size: 26px;
  color: #C5A572;
  z-index: 2;
  animation: aiibFlyToHotel 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 4px 8px rgba(197, 165, 114, 0.3));
}

/* Hotel building on the right (destination) */
.aiib-loading-hotel {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 30px;
  color: rgba(255, 255, 255, 0.85);
  z-index: 2;
  animation: aiibHotelPulse 2.5s ease-in-out infinite;
}

/* Little clouds for atmosphere */
.aiib-loading-cloud {
  position: absolute;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.15);
  animation: aiibCloudFloat 3s ease-in-out infinite;
}
.aiib-loading-cloud:nth-of-type(1) {
  top: 20%;
  left: 35%;
  animation-delay: 0s;
}
.aiib-loading-cloud:nth-of-type(2) {
  top: 60%;
  left: 60%;
  animation-delay: 1s;
  font-size: 10px;
}

/* 2026 AIIB ANNUAL MEETING badge above the path */
.aiib-loading-badge {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #C5A572;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 6px 14px;
  background: rgba(10, 37, 64, 0.9);
  border: 1px solid rgba(197, 165, 114, 0.35);
  border-radius: 20px;
  z-index: 3;
  animation: aiibBadgePulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(197, 165, 114, 0.15), inset 0 0 10px rgba(197, 165, 114, 0.05);
}

/* Loading text */
.aiib-loading-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: aiibTextFade 2.5s ease-in-out infinite;
}
.aiib-loading-text .dot {
  animation: aiibDotBlink 1.4s ease-in-out infinite;
}
.aiib-loading-text .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.aiib-loading-text .dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Animations */
@keyframes aiibBankPulse {
  0%, 70% {
    transform: translateY(-50%) scale(1);
    opacity: 0.7;
  }
  85% {
    transform: translateY(-50%) scale(1.12);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  }
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 0.7;
  }
}

@keyframes aiibFlyToHotel {
  0% {
    left: 40px;
    transform: translateY(-50%) rotate(-5deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    left: calc(100% - 76px);
    transform: translateY(-50%) rotate(0deg);
    opacity: 1;
  }
  100% {
    left: calc(100% - 76px);
    transform: translateY(-50%) rotate(0deg);
    opacity: 0;
  }
}

@keyframes aiibHotelPulse {
  0%, 70% {
    transform: translateY(-50%) scale(1);
    opacity: 0.7;
  }
  85% {
    transform: translateY(-50%) scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(197, 165, 114, 0.5));
  }
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 0.7;
  }
}

@keyframes aiibCloudFloat {
  0%, 100% { transform: translateX(0); opacity: 0.1; }
  50% { transform: translateX(8px); opacity: 0.25; }
}

@keyframes aiibTextFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes aiibDotBlink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes aiibBadgePulse {
  0%, 70% {
    transform: translateX(-50%) scale(1);
    opacity: 0.85;
    box-shadow: 0 0 20px rgba(197, 165, 114, 0.15), inset 0 0 10px rgba(197, 165, 114, 0.05);
  }
  85% {
    transform: translateX(-50%) scale(1.08);
    opacity: 1;
    box-shadow: 0 0 30px rgba(197, 165, 114, 0.3), inset 0 0 15px rgba(197, 165, 114, 0.1);
    border-color: rgba(197, 165, 114, 0.6);
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.85;
    box-shadow: 0 0 20px rgba(197, 165, 114, 0.15), inset 0 0 10px rgba(197, 165, 114, 0.05);
  }
}

/* Fade in/out for the overlay itself */
.aiib-loading-overlay.fade-in {
  animation: aiibOverlayFadeIn 0.3s ease forwards;
}
.aiib-loading-overlay.fade-out {
  animation: aiibOverlayFadeOut 0.3s ease forwards;
}

@keyframes aiibOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes aiibOverlayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
