/**
 * EduBee Common Shared Styles & Utilities
 */

/* 1. Page Transition Effects */
body {
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
}

body.page-transitioning {
  opacity: 0.1;
  pointer-events: none;
}

/* 2. Offline Notification Banner */
.offline-banner {
  background-color: #ef4444;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.5px;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.offline-banner.alert-success {
  background-color: #10b981;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* 3. Skeleton Loading Shimmers */
.placeholder {
  display: inline-block;
  background-color: #e2e8f0;
  position: relative;
  overflow: hidden;
  vertical-align: middle;
  cursor: wait;
}

.placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* 4. Pulse Animation for Icons */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* 5. Custom Scrollbar for Sleek Premium Look */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* Dark Mode Scrollbars for Specific Templates (Space theme) */
.dark-theme-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.dark-theme-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}
.dark-theme-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 6. Premium Page Headers & Sub-page Layout Elements */
.page-header {
  border-radius: 0 0 40px 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.text-shadow {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* 7. Central Timeline Graphic */
.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #cbd5e1;
  transform: translateX(-50%);
}

@media (max-width: 767.98px) {
  .timeline::before {
    left: 30px;
  }
}

/* 8. Floating Balloons Birthday Animation */
.floating-balloon {
  position: fixed;
  width: 35px;
  height: 45px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  color: white;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10000;
  box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.15), 3px 3px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-balloon::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid currentColor;
}

.balloon-string {
  position: absolute;
  width: 1px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.2);
  bottom: -46px;
  left: 50%;
  transform: translateX(-50%);
}
