/* ==========================================================================
   SafarGet — Compact Golden Balloon "1 Million Active Users" Milestone Badge
   Sleek balloon-pill silhouette + floating 3D metallic gold balloon emblem
   Self-isolated under #sg-milestone-banner
   ========================================================================== */

#sg-milestone-banner {
  position: relative;
  z-index: 11;
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 10px auto 4px;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: "IBM Plex Sans Arabic", "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  animation: sg-ms-enter 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#sg-milestone-banner *,
#sg-milestone-banner *::before,
#sg-milestone-banner *::after {
  box-sizing: border-box;
}

@keyframes sg-ms-enter {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* Flowing metallic gold outer balloon-capsule border */
#sg-milestone-banner .sg-ms-shell {
  position: relative;
  border-radius: 999px;
  padding: 1.5px;
  background: linear-gradient(
    120deg,
    rgba(254, 240, 138, 0.92) 0%,
    rgba(245, 196, 81, 0.45) 32%,
    rgba(217, 119, 6, 0.78) 64%,
    rgba(254, 249, 195, 0.95) 100%
  );
  background-size: 230% 230%;
  animation: sg-ms-border-flow 6.5s ease-in-out infinite alternate;
  box-shadow:
    0 14px 32px rgba(8, 12, 16, 0.28),
    0 4px 16px rgba(245, 196, 81, 0.2),
    0 0 24px rgba(245, 196, 81, 0.14);
}

@keyframes sg-ms-border-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Dark obsidian + warm gold balloon inner capsule */
#sg-milestone-banner .sg-ms-card {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  padding: 9px 16px 9px 12px;
  background:
    radial-gradient(50% 120% at 10% 45%, rgba(250, 204, 21, 0.24), transparent 65%),
    radial-gradient(45% 100% at 90% 30%, rgba(217, 119, 6, 0.18), transparent 65%),
    linear-gradient(135deg, #090b0f 0%, #17130a 52%, #0a0c10 100%);
  color: #fef9e7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html[dir="rtl"] #sg-milestone-banner .sg-ms-card {
  padding: 9px 12px 9px 16px;
}

/* Glossy top balloon highlight */
#sg-milestone-banner .sg-ms-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 45%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.1) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Gliding gold light sweep */
#sg-milestone-banner .sg-ms-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    112deg,
    transparent 26%,
    rgba(254, 240, 138, 0.12) 48%,
    rgba(245, 196, 81, 0.08) 54%,
    transparent 70%
  );
  transform: translateX(-115%);
  animation: sg-ms-sweep 6s ease-in-out infinite;
}

@keyframes sg-ms-sweep {
  0%, 54% {
    transform: translateX(-115%);
  }
  100% {
    transform: translateX(120%);
  }
}

/* Ambient floating gold sparkles */
#sg-milestone-banner .sg-ms-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

#sg-milestone-banner .sg-ms-spark {
  position: absolute;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 8px #f5c451;
  opacity: 0.65;
  animation: sg-ms-twinkle 4s ease-in-out infinite;
}

#sg-milestone-banner .sg-ms-spark--1 {
  width: 3.5px;
  height: 3.5px;
  top: 20%;
  left: 22%;
}

#sg-milestone-banner .sg-ms-spark--2 {
  width: 3px;
  height: 3px;
  bottom: 18%;
  left: 56%;
  background: #f5c451;
  animation-delay: 1.4s;
}

#sg-milestone-banner .sg-ms-spark--3 {
  width: 3.5px;
  height: 3.5px;
  top: 22%;
  right: 18%;
  animation-delay: 2.3s;
}

@keyframes sg-ms-twinkle {
  0%, 100% {
    opacity: 0.22;
    transform: translateY(0) scale(0.85);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-4px) scale(1.2);
  }
}

/* Start group: Floating 3D Golden Balloon + Text */
#sg-milestone-banner .sg-ms-main {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 auto;
}

/* Floating Golden Balloon Emblem */
#sg-milestone-banner .sg-ms-balloon {
  position: relative;
  flex: none;
  width: 48px;
  height: 54px;
  display: grid;
  place-items: center;
  animation: sg-ms-balloon-float 3.8s ease-in-out infinite;
  transform-origin: 50% 85%;
}

#sg-milestone-banner .sg-ms-balloon-glow {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.52), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
  animation: sg-ms-glow 4.2s ease-in-out infinite alternate;
}

@keyframes sg-ms-balloon-float {
  0%, 100% {
    transform: translateY(1px) rotate(-2.5deg);
  }
  50% {
    transform: translateY(-4px) rotate(2.5deg);
  }
}

@keyframes sg-ms-glow {
  0% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  100% {
    opacity: 0.95;
    transform: scale(1.08);
  }
}

#sg-milestone-banner .sg-ms-balloon svg {
  width: 46px;
  height: 52px;
  display: block;
  filter: drop-shadow(0 5px 10px rgba(245, 196, 81, 0.45));
}

/* Text stack */
#sg-milestone-banner .sg-ms-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#sg-milestone-banner .sg-ms-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

#sg-milestone-banner .sg-ms-title {
  margin: 0;
  font-size: clamp(13.5px, 1.5vw, 16px);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.25px;
  color: #ffffff;
}

#sg-milestone-banner .sg-ms-gold-text {
  background: linear-gradient(120deg, #fffbeb 0%, #fde68a 28%, #f5c451 62%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#sg-milestone-banner .sg-ms-sub {
  margin: 0;
  font-size: 11px;
  line-height: 1.38;
  color: #d9ceb2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* End Golden Balloon Seal Pill */
#sg-milestone-banner .sg-ms-seal {
  position: relative;
  z-index: 3;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(254, 240, 138, 0.55);
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.24), rgba(180, 83, 9, 0.2));
  color: #fef08a;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow:
    0 4px 14px rgba(245, 196, 81, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

#sg-milestone-banner .sg-ms-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.28);
  animation: sg-ms-pulse 1.8s ease-in-out infinite;
}

@keyframes sg-ms-pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.04);
    opacity: 0.72;
  }
}

#sg-milestone-banner .sg-ms-stars {
  display: inline-flex;
  align-items: center;
  color: #facc15;
  font-size: 10px;
  line-height: 1;
}

/* Responsive */
@media (max-width: 620px) {
  #sg-milestone-banner {
    padding: 0 12px;
    margin-top: 8px;
  }

  #sg-milestone-banner .sg-ms-shell {
    border-radius: 26px;
  }

  #sg-milestone-banner .sg-ms-card,
  html[dir="rtl"] #sg-milestone-banner .sg-ms-card {
    border-radius: 24.5px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 11px 14px;
    gap: 8px;
  }

  #sg-milestone-banner .sg-ms-main {
    flex-direction: column;
    gap: 6px;
  }

  #sg-milestone-banner .sg-ms-title-row {
    justify-content: center;
  }

  #sg-milestone-banner .sg-ms-sub {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sg-milestone-banner,
  #sg-milestone-banner .sg-ms-shell,
  #sg-milestone-banner .sg-ms-shine,
  #sg-milestone-banner .sg-ms-spark,
  #sg-milestone-banner .sg-ms-balloon,
  #sg-milestone-banner .sg-ms-balloon-glow,
  #sg-milestone-banner .sg-ms-dot {
    animation: none !important;
  }
}
