/* ============================================================
   CIRCULAR GOLD YELLOW LOADING ELEMENT & AJAX OPTIMIZATION
   Luxury Styling for Joe's Nails Bar & Legend K Beauty Academy
   ============================================================ */

:root {
  --gold-primary: #D4AF37;
  --gold-bright: #FFD700;
  --gold-deep: #B8860B;
  --gold-glow: 0 0 16px rgba(255, 215, 0, 0.45);
  --gold-track: rgba(255, 215, 0, 0.18);
}

/* Keyframe for Smooth Circular Rotation */
@keyframes spinGoldCircular {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Keyframe for Golden Core Glow Pulsing */
@keyframes goldCorePulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.8;
    box-shadow: 0 0 6px #FFD700;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
    box-shadow: 0 0 14px #FFD700, 0 0 20px rgba(255, 215, 0, 0.6);
  }
}

/* Base Circular Gold Spinner */
.gold-spinner {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3.5px solid var(--gold-track);
  border-top-color: #FFD700;
  border-right-color: #D4AF37;
  border-bottom-color: rgba(255, 215, 0, 0.35);
  box-sizing: border-box;
  animation: spinGoldCircular 0.82s cubic-bezier(0.5, 0.12, 0.38, 0.95) infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.55));
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Concentric luxury inner gold dot */
.gold-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #FFF9C4 0%, #FFD700 55%, #B8860B 100%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: goldCorePulse 1.6s ease-in-out infinite;
  pointer-events: none;
}

/* Size Variants */
.gold-spinner-sm {
  width: 22px;
  height: 22px;
  border-width: 2.5px;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}
.gold-spinner-sm::after {
  width: 5px;
  height: 5px;
}

.gold-spinner-md {
  width: 38px;
  height: 38px;
  border-width: 3px;
}
.gold-spinner-md::after {
  width: 8px;
  height: 8px;
}

.gold-spinner-lg {
  width: 58px;
  height: 58px;
  border-width: 4px;
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.65));
}
.gold-spinner-lg::after {
  width: 13px;
  height: 13px;
}

/* ============================================================
   GLOBAL FLOATING AJAX INDICATOR (Top Right Badge)
   ============================================================ */
#global-ajax-loader {
  position: fixed;
  top: 24px;
  right: 25px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(15, 15, 17, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 215, 0, 0.38);
  border-radius: 30px;
  padding: 7px 18px 7px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 215, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.25s;
}

#global-ajax-loader.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#global-ajax-loader .loader-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFD700;
  letter-spacing: 0.6px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  white-space: nowrap;
}

/* ============================================================
   SECTION LOADING CONTAINERS (Inside Grids & Galleries)
   ============================================================ */
.gold-section-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  width: 100%;
  grid-column: 1 / -1;
  text-align: center;
  gap: 16px;
  min-height: 220px;
  animation: fadeInLoader 0.3s ease;
}

@keyframes fadeInLoader {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.gold-section-loader .gold-loader-caption {
  font-size: 0.92rem;
  font-weight: 500;
  color: #D4AF37;
  letter-spacing: 0.5px;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

/* ============================================================
   BUTTON LOADING STATES
   ============================================================ */
.btn.is-loading,
button.is-loading {
  position: relative !important;
  color: transparent !important;
  pointer-events: none !important;
  cursor: wait !important;
}

.btn.is-loading .gold-spinner-sm,
button.is-loading .gold-spinner-sm {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}
