/**
 * ══════════════════════════════════════════════════════════════════════
 * Nagar Panchayat Shergarh — "Tax Orbit" Direct Payment Floating CTA
 * ══════════════════════════════════════════════════════════════════════
 * Signature Civic-Tech Floating Action Button with Heavy Orbital Motions,
 * Sonar Waves, Pop-up Heartbeats, Blinking Beacons & Liquid Gold Shimmer
 */

/* ── Floating CTA Root Hub ── */
.tax-orbit-cta-hub {
  position: fixed;
  right: 26px;
  bottom: 84px; /* Perfectly cleared above #scrollTop button */
  z-index: 1045;
  font-family: 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  pointer-events: none; /* Hub container allows clicks around it */
  transform: translateZ(0);
}

/* ── 1. Atmospheric Sonar / Radar Wave Rings ── */
.tax-orbit-sonar-emitter {
  position: absolute;
  inset: -12px;
  pointer-events: none;
  z-index: 0;
}

.tax-orbit-sonar-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15) 0%, rgba(93, 13, 26, 0.25) 50%, transparent 75%);
  opacity: 0;
  transform: scale(0.85);
  animation: taxSonarWave 3.6s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
}

.tax-orbit-sonar-ring.ring-2 {
  animation-delay: 1.2s;
  border-color: rgba(248, 217, 136, 0.45);
}

.tax-orbit-sonar-ring.ring-3 {
  animation-delay: 2.4s;
  border-color: rgba(93, 13, 26, 0.55);
}

@keyframes taxSonarWave {
  0% {
    opacity: 0.85;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: scale(1.38);
  }
}

/* ── 2. Primary Action Button Capsule ── */
.tax-orbit-cta-btn {
  pointer-events: auto;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 10px;
  text-decoration: none !important;
  color: #FFF9EB !important;
  background: linear-gradient(135deg, #3A050D 0%, #580C19 35%, #7D1525 70%, #3D050D 100%);
  border: 1.8px solid rgba(212, 175, 55, 0.85);
  border-radius: 9999px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 
    0 14px 34px -4px rgba(35, 3, 8, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 22px rgba(212, 175, 55, 0.28);
  transition: 
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
  animation: taxCtaAttention 4.5s ease-in-out infinite;
  transform-origin: center right;
  backdrop-filter: blur(14px) saturate(190%);
  -webkit-backdrop-filter: blur(14px) saturate(190%);
}

/* Periodic Attention Pop-up / Heartbeat Bounce */
@keyframes taxCtaAttention {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  70% {
    transform: scale(1) translateY(0);
  }
  75% {
    transform: scale(1.06) translateY(-6px);
    box-shadow: 
      0 20px 42px -4px rgba(93, 13, 26, 0.65),
      0 0 32px rgba(212, 175, 55, 0.55),
      0 0 0 2px rgba(255, 255, 255, 0.28) inset;
  }
  80% {
    transform: scale(0.97) translateY(1px);
  }
  85% {
    transform: scale(1.03) translateY(-3px);
  }
  90% {
    transform: scale(0.99) translateY(0);
  }
}

.tax-orbit-cta-btn:hover {
  animation-play-state: paused;
  transform: translateY(-5px) scale(1.04);
  border-color: #F8D988;
  box-shadow: 
    0 22px 48px -6px rgba(93, 13, 26, 0.7),
    0 0 38px rgba(212, 175, 55, 0.6),
    0 0 0 2px rgba(255, 255, 255, 0.3) inset;
}

.tax-orbit-cta-btn:active {
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 6px 18px rgba(93, 13, 26, 0.6);
}

/* ── 3. Diagonal Liquid Metallic Gold Specular Shimmer ── */
.tax-orbit-shimmer-sheen {
  position: absolute;
  top: -60%;
  left: -80%;
  width: 60%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 20%,
    rgba(248, 217, 136, 0.38) 45%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(248, 217, 136, 0.38) 55%,
    rgba(255, 255, 255, 0.04) 80%,
    transparent 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: taxShimmerGlide 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes taxShimmerGlide {
  0% {
    left: -90%;
  }
  40%, 100% {
    left: 170%;
  }
}

/* ── 4. Core Orbital Sphere & 3D Rotating Satellites ── */
.tax-orbit-sphere-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Orbit Track Ring */
.tax-orbit-track-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.45);
  animation: taxOrbitSpin 5s linear infinite;
  pointer-events: none;
}

.tax-orbit-cta-btn:hover .tax-orbit-track-ring {
  animation-duration: 2s; /* Supercharges orbit speed on hover */
  border-color: rgba(248, 217, 136, 0.85);
}

@keyframes taxOrbitSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Orbiting Satellites (Tiny luminous celestial particles) */
.tax-orbit-satellite {
  position: absolute;
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #FFF099;
  box-shadow: 0 0 8px 2px #FFD700, 0 0 14px #FF9900;
}

.tax-orbit-satellite.satellite-alpha {
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}

.tax-orbit-satellite.satellite-beta {
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  background: #99FFDF;
  box-shadow: 0 0 8px 2px #00FFAA, 0 0 14px #00CC88;
}

/* Core Gem Center Emblem */
.tax-orbit-core-emblem {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9B1C2E 0%, #680E1C 55%, #38040C 100%);
  border: 1.5px solid rgba(248, 217, 136, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 12px rgba(212, 175, 55, 0.45) inset;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tax-orbit-cta-btn:hover .tax-orbit-core-emblem {
  transform: scale(1.1) rotate(-6deg);
}

.tax-orbit-core-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.35) 0%, transparent 70%);
  animation: taxCoreBreathe 2.4s ease-in-out infinite;
}

@keyframes taxCoreBreathe {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.tax-orbit-symbol {
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFF2A8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 215, 0, 0.5);
  font-family: 'Eczar', serif;
  line-height: 1;
}

.tax-orbit-card-subicon {
  position: absolute;
  bottom: 3px;
  right: 4px;
  font-size: 0.68rem;
  color: #F8D988;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

/* Live Blinking Status Beacon */
.tax-orbit-live-beacon {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tax-orbit-beacon-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #00FF88;
  box-shadow: 0 0 8px #00FF88, 0 0 14px rgba(0, 255, 136, 0.8);
  border: 1px solid #FFFFFF;
}

.tax-orbit-beacon-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #00FF88;
  animation: taxBeaconPing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes taxBeaconPing {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ── 5. Typography & Value Messaging ── */
.tax-orbit-body {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  text-align: left;
}

.tax-orbit-headline {
  display: flex;
  align-items: baseline;
  line-height: 1.15;
}

.tax-orbit-main-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #FFF9EB;
  letter-spacing: 0.35px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 12px rgba(248, 217, 136, 0.4);
  white-space: nowrap;
}

.tax-orbit-sub-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.70rem;
  color: #F8D988;
  font-weight: 600;
  white-space: nowrap;
}

.tax-orbit-sub-tag {
  transition: color 0.2s ease;
}

.tax-orbit-sub-sep {
  opacity: 0.6;
  color: #F8D988;
}

.tax-orbit-cta-btn:hover .tax-orbit-sub-tag {
  color: #FFF2C2;
}

/* ── 6. Directional Action Capsule (Arrow) ── */
.tax-orbit-action-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.tax-orbit-arrow-circle {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(248, 217, 136, 0.28) 0%, rgba(212, 175, 55, 0.12) 100%);
  border: 1px solid rgba(248, 217, 136, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F8D988;
  font-size: 0.95rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tax-orbit-arrow-icon {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: taxArrowNudge 2.2s ease-in-out infinite;
}

@keyframes taxArrowNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.tax-orbit-cta-btn:hover .tax-orbit-arrow-circle {
  background: #F8D988;
  color: #5D0D1A;
  border-color: #FFFFFF;
  box-shadow: 0 0 16px rgba(248, 217, 136, 0.85);
  transform: scale(1.1);
}

.tax-orbit-cta-btn:hover .tax-orbit-arrow-icon {
  transform: translateX(4px);
  animation: none;
}

/* ── 7. High-Velocity Pop-up / Neon Glow Blink Animations ── */
.tax-orbit-pop-burst {
  animation: taxHeavyPopBlink 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes taxHeavyPopBlink {
  0% {
    transform: scale(1) translateY(0);
    box-shadow: 0 14px 34px -4px rgba(35, 3, 8, 0.55), 0 0 20px rgba(212, 175, 55, 0.3);
  }
  15% {
    transform: scale(1.12) translateY(-7px);
    border-color: #FFF099;
    box-shadow: 
      0 22px 52px -4px rgba(93, 13, 26, 0.85),
      0 0 35px #FFD700,
      0 0 55px rgba(255, 215, 0, 0.65),
      0 0 0 2px rgba(255, 255, 255, 0.4) inset;
  }
  30% {
    transform: scale(0.96) translateY(1px);
    border-color: rgba(248, 217, 136, 0.85);
  }
  45% {
    transform: scale(1.08) translateY(-4px);
    border-color: #FFFFFF;
    box-shadow: 
      0 18px 42px -4px rgba(93, 13, 26, 0.75),
      0 0 32px #FFD700,
      0 0 45px rgba(255, 215, 0, 0.5);
  }
  60% {
    transform: scale(0.99) translateY(0);
  }
  75% {
    transform: scale(1.03) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

/* ── 8. Intelligent Mobile Adaptations (Circle FAB ↔ Expanded Pill) ── */
@media (max-width: 767.98px) {
  .tax-orbit-cta-hub {
    right: 14px;
    bottom: 74px; /* Perfectly cleared on mobile */
    z-index: 1045;
  }

  .tax-orbit-cta-btn {
    transition: 
      max-width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
      min-width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
      width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
      height 0.4s ease,
      padding 0.5s ease,
      border-radius 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
      border-color 0.3s ease,
      box-shadow 0.4s ease,
      transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, width, max-width, border-radius;
  }

  /* ── Mobile State: Circle Mode (Initial & Idle state on phone) ── */
  .tax-orbit-cta-btn.tax-orbit-state-circle {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    height: 54px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center;
    gap: 0;
    box-shadow: 
      0 10px 28px rgba(35, 3, 8, 0.65),
      0 0 20px rgba(248, 217, 136, 0.6);
    animation: taxCircleBlinkPulse 2.6s ease-in-out infinite;
  }

  .tax-orbit-cta-btn.tax-orbit-state-circle .tax-orbit-sphere-wrapper {
    width: 48px;
    height: 48px;
    margin: 0 auto;
  }

  .tax-orbit-cta-btn.tax-orbit-state-circle .tax-orbit-core-emblem {
    width: 42px;
    height: 42px;
  }

  .tax-orbit-cta-btn.tax-orbit-state-circle .tax-orbit-symbol {
    font-size: 1.45rem;
  }

  .tax-orbit-cta-btn.tax-orbit-state-circle .tax-orbit-body {
    max-width: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transform: translateX(16px);
    transition: max-width 0.45s ease, opacity 0.25s ease, transform 0.4s ease;
  }

  .tax-orbit-cta-btn.tax-orbit-state-circle .tax-orbit-action-cap {
    max-width: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    transition: max-width 0.4s ease, opacity 0.2s ease;
  }

  /* ── Mobile State: Expanded Pill Mode on Phone ── */
  .tax-orbit-cta-btn.tax-orbit-state-pill {
    width: auto !important;
    min-width: 228px !important;
    max-width: 320px !important;
    height: 54px !important;
    padding: 6px 14px 6px 8px !important;
    border-radius: 9999px !important;
    gap: 10px;
    box-shadow: 
      0 14px 34px -4px rgba(35, 3, 8, 0.65),
      0 0 26px rgba(212, 175, 55, 0.45);
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-sphere-wrapper {
    width: 42px;
    height: 42px;
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-core-emblem {
    width: 38px;
    height: 38px;
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-symbol {
    font-size: 1.3rem;
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-body {
    max-width: 200px;
    opacity: 1;
    transform: translateX(0);
    transition: max-width 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease 0.1s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-main-title {
    font-size: 0.90rem;
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-sub-pills {
    display: inline-flex !important;
    font-size: 0.64rem;
    gap: 3px;
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-action-cap {
    max-width: 34px;
    opacity: 1;
    margin-left: 2px;
    transition: max-width 0.5s ease 0.1s, opacity 0.35s ease 0.1s;
  }

  .tax-orbit-cta-btn.tax-orbit-state-pill .tax-orbit-arrow-circle {
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }
}

/* Pulsing beacon glow when resting as a circle */
@keyframes taxCircleBlinkPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 28px rgba(35, 3, 8, 0.65), 0 0 18px rgba(248, 217, 136, 0.45);
    border-color: rgba(248, 217, 136, 0.85);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 
      0 14px 34px rgba(93, 13, 26, 0.8),
      0 0 30px #FFD700,
      0 0 45px rgba(255, 215, 0, 0.5);
    border-color: #FFF099;
  }
}
