[data-loading] {
  display: none;
}

/* Global Loading Indicator */
.global-loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease-in, visibility 200ms;
  transition-delay: 1000ms;
  /* Only show after 1000ms */
}

.htmx-request .global-loading-indicator,
.htmx-request.global-loading-indicator {
  opacity: 1;
  visibility: visible;
}

.global-loading-content {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 10000;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .global-loading-indicator {
    background: rgba(0, 0, 0, 0.8);
  }

  .global-loading-content {
    background: white;
    color: white;
  }
}
