/**
 * Firebase Loading Indicator Styles
 * Provides visual feedback during Firebase operations
 */

/* Firebase loading indicator container */
#firebase-loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: transparent;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Firebase loading indicator progress bar */
#firebase-loading-indicator > div {
  height: 100%;
  width: 0%;
  background-color: #f97316;
  transition: width 0.3s ease-out;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 5px rgba(249, 115, 22, 0.5);
}

/* Firebase sync progress indicator */
#firebase-sync-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  font-size: 14px;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: opacity 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Firebase sync progress message */
#firebase-sync-message {
  flex: 0 0 auto;
  margin-right: 10px;
}

/* Firebase sync progress bar container */
#firebase-sync-progress > div:last-child {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

/* Firebase sync progress bar */
#firebase-sync-progress-bar {
  height: 100%;
  background-color: #f97316;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  #firebase-loading-indicator > div,
  #firebase-sync-progress-bar {
    transition: none;
  }
}

/* Low-end device optimizations */
.low-end-device #firebase-loading-indicator > div,
.low-end-device #firebase-sync-progress-bar {
  box-shadow: none;
  transition: none;
}
