/*
 * GOLPOOGRO - Component: Premium Follow Button System
 * Sleek premium morph states, pulse animations, and micro spinners with deep glass styling
 */

.follow-morph-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  height: 34px;
  padding: 0 16px;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 99px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.follow-morph-btn .btn-text {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Microloading spinner styling */
.follow-morph-btn .micro-loading-spinner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.follow-morph-btn.loading-state {
  pointer-events: none;
}

.follow-morph-btn.loading-state .btn-text {
  opacity: 0;
  transform: scale(0.85);
}

.follow-morph-btn.loading-state .micro-loading-spinner {
  opacity: 1;
  transform: scale(1);
  animation: premiumBtnSpin 0.75s linear infinite;
}

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

/* state color variations */

/* 1. STATE: FOLLOW */
.follow-morph-btn.follow {
  background: #ffffff;
  color: #0b0f19;
  border-color: #ffffff;
}

.follow-morph-btn.follow:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* 2. STATE: FOLLOWING */
.follow-morph-btn.following {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

.follow-morph-btn.following:hover {
  background: rgba(255, 0, 0, 0.08);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.2);
  content: "Unfollow";
}

/* 3. STATE: REQUESTED */
.follow-morph-btn.requested {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
  animation: glowPulseRequested 2s infinite ease-in-out;
}

.follow-morph-btn.requested:hover {
  background: rgba(168, 85, 247, 0.15);
  transform: scale(1.02);
}

@keyframes glowPulseRequested {
  0%, 100% { box-shadow: 0 4px 12px rgba(168, 85, 247, 0.1); }
  50% { box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3); }
}

/* 4. STATE: MUTUAL */
.follow-morph-btn.mutual {
  background: rgba(20, 184, 166, 0.1);
  color: #2dd4bf;
  border-color: rgba(20, 184, 166, 0.3);
}

.follow-morph-btn.mutual:hover {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.4);
  transform: translateY(-2px);
}

/* 5. STATE: BLOCKED */
.follow-morph-btn.blocked {
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.25);
}

/* 6. STATE: CLOSE FRIEND */
.follow-morph-btn.close-friend {
  background: rgba(236, 72, 153, 0.1);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.35);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.15);
}

.follow-morph-btn.close-friend:hover {
  background: rgba(236, 72, 153, 0.15);
}

/* Ripple light animation backdrop */
.follow-morph-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
  pointer-events: none;
}

.follow-morph-btn:active::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition: 0s;
}
