/* css/animations.css */

.scybud-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0);
  z-index: var(--z-modal);
  cursor: zoom-out;
  transition: background var(--transition-normal);
  /* Removed flex properties to allow clean manual absolute layout overrides */
}

.scybud-lightbox-overlay.active {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: var(--filter);
}

.scybud-lightbox-img {
  position: fixed;
  object-fit: contain;
  z-index: calc(var(--z-modal) + 1);
  transition: transform var(--transition-normal), 
              top var(--transition-normal), 
              left var(--transition-normal), 
              width var(--transition-normal), 
              height var(--transition-normal);
  border-radius: var(--radius-sm);
}

.scybud-lightbox-img.open {
  /* Force clean centering calculation relative to screen viewports */
  top: 10% !important;
  left: 10% !important;
  width: 80% !important;
  height: 80% !important;
  border-radius: var(--radius-md);
}


/* BUTTON LOADER ANIMATION */
.btn.loading {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  cursor: wait;
  opacity: 0.75;
  color: transparent !important;
}
.btn.loading > * {
  visibility: hidden;
}
.btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.8s linear infinite;
  color: var(--text-muted, #fff);
}

.loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 130px;
  width: 100%;
  padding: var(--space-md);
  color: var(--text-muted, #777);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}
.loader::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
