/*
 * IBAG Wait Overlay (frontend)
 * - Consistent loader (neon yin-yang / two drops)
 * - Prevents ugly gallery flash by hiding gallery while overlay is active
 */

.ibag-wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

html.ibag-waiting .ibag-wait-overlay {
  display: flex;
}

/* While waiting, keep layout (so lazy-loading still works) but hide visually */
html.ibag-waiting .inkbyaig-gallery {
  opacity: 0;
  pointer-events: none;
}

.inkbyaig-gallery {
  transition: opacity .14s ease;
}

html.ibag-waiting body {
  cursor: progress;
}

/* === Loader – neon yin-yang (two drops) ===
   Kept identical to the loader used in the tag search UI.
*/
.ibag-tag-spinner {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0,255,255,.35), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(255,0,120,.35), transparent 60%);
  box-shadow: 0 0 18px rgba(0,255,255,.5), 0 0 30px rgba(255,0,120,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ibag-tag-spin 1.6s linear infinite;
}

.drop {
  position: absolute;
  width: 54%;
  height: 54%;
  border-radius: 60% 60% 45% 45%;
  transform-origin: 50% 20%;
  box-shadow: 0 0 10px currentColor, 0 0 26px currentColor;
}

.drop-red {
  top: 8%;
  left: 14%;
  background: radial-gradient(circle at 30% 30%, #ff8abf, #ff004c);
  color: #ff004c;
}

.drop-blue {
  bottom: 8%;
  right: 14%;
  background: radial-gradient(circle at 70% 70%, #7fffff, #00e5ff);
  color: #00e5ff;
  transform: rotate(180deg);
}

@keyframes ibag-tag-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
