/* ==============================================
   MAIDAM GOLD - UI ENHANCEMENTS
   Bright Premium Interactions & Components
   ============================================== */

/* ========================
   LOADING SCREEN
   ======================== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  font-family: var(--font-body);
  font-size: 18px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 32px;
  letter-spacing: 8px;
  text-transform: uppercase;
  font-weight: 700;
}

.loading-bar {
  width: 120px;
  height: 3px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 3px;
  animation: loadBar 1s var(--ease-out-expo) forwards;
}

@keyframes loadBar {
  to { width: 100%; }
}

/* ========================
   PAGE TRANSITION
   ======================== */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out-expo);
  pointer-events: none;
}

.page-transition.active {
  opacity: 1;
  visibility: visible;
}

/* ========================
   CURSOR GLOW (desktop only)
   ======================== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 150, 12, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

.cursor-glow.active {
  opacity: 1;
}

/* ========================
   TOAST NOTIFICATIONS
   ======================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  animation: toastSlide 0.5s var(--ease-out-expo);
  min-width: 320px;
  max-width: 440px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.info { border-left: 3px solid var(--gold); }

.toast-icon { font-size: 18px; font-weight: bold; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }
.toast.info .toast-icon { color: var(--gold); }

.toast-message { flex: 1; font-size: 14px; color: var(--text-primary); }

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s;
}

.toast-close:hover { color: var(--text-primary); }

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========================
   WHATSAPP FLOATING
   ======================== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  z-index: 999;
  transition: all 0.4s var(--ease-out-expo);
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(37,211,102,0.35);
}

.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37,211,102,0.45);
}

/* Pulse ring */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.3);
  animation: waPulse 2s ease-in-out infinite;
}

@keyframes waPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0; }
}

.whatsapp-float .tooltip {
  position: absolute;
  right: 72px;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  white-space: nowrap;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: all 0.3s var(--ease-out-expo);
}

.whatsapp-float:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* ========================
   BACK TO TOP
   ======================== */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--bg-primary);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.4s var(--ease-out-expo);
  box-shadow: var(--shadow-sm);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold-gradient);
  color: white;
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

/* ========================
   SPINNER
   ======================== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========================
   SMOOTH SCROLL INDICATOR
   ======================== */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.scroll-indicator span {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.scroll-indicator-line {
  width: 1.5px;
  height: 40px;
  background: var(--border-light);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.scroll-indicator-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--gold);
  animation: scrollLine 1.5s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -50%; }
  100% { top: 100%; }
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
  .cursor-glow { display: none; }
  .scroll-indicator { bottom: 20px; }
}

@media (max-width: 480px) {
  .toast-container { left: 12px; right: 12px; }
  .toast { min-width: auto; }
  .whatsapp-float { bottom: 20px; right: 20px; width: 52px; height: 52px; font-size: 24px; }
  .back-to-top { bottom: 84px; right: 24px; width: 38px; height: 38px; }
}
