/* Rasa Web — expandable social launcher (fa/en/ar × light/dark). */

#rw-social-fab.rw-social-fab {
  --rw-social-bg: rgba(248, 252, 255, .94);
  --rw-social-surface: rgba(231, 243, 255, .9);
  --rw-social-border: rgba(55, 146, 236, .3);
  --rw-social-text: #17345c;
  --rw-social-muted: #6780a2;
  --rw-social-accent: #168cff;
  --rw-social-cyan: #31d5ff;
  position: fixed !important;
  z-index: 76 !important;
  left: 18px !important;
  right: auto !important;
  bottom: max(22px, env(safe-area-inset-bottom)) !important;
  width: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  direction: ltr !important;
  pointer-events: none !important;
  isolation: isolate !important;
}

#rw-social-fab .rw-social-fab__toggle {
  position: relative !important;
  z-index: 3 !important;
  display: grid !important;
  place-items: center !important;
  width: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  color: var(--rw-social-text) !important;
  border: 1px solid var(--rw-social-border) !important;
  border-radius: 17px !important;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .95), transparent 42%),
    var(--rw-social-bg) !important;
  box-shadow: 0 14px 34px rgba(8, 57, 119, .2), inset 0 1px 0 rgba(255, 255, 255, .86) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.22) !important;
  backdrop-filter: blur(18px) saturate(1.22) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), color .24s ease, border-color .24s ease, box-shadow .24s ease, background-color .24s ease !important;
}

#rw-social-fab .rw-social-fab__toggle::before {
  content: "" !important;
  position: absolute !important;
  inset: -1px !important;
  z-index: -1 !important;
  border: 1px solid rgba(49, 213, 255, .52) !important;
  border-radius: inherit !important;
  opacity: 0 !important;
  transform: scale(.92) !important;
}

#rw-social-fab[data-open="false"] .rw-social-fab__toggle::before {
  animation: rw-social-pulse 3.4s ease-out infinite !important;
}

#rw-social-fab .rw-social-fab__toggle:hover,
#rw-social-fab .rw-social-fab__toggle:focus-visible,
#rw-social-fab[data-open="true"] .rw-social-fab__toggle {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(145deg, #176cff, #22b9ef) !important;
  box-shadow: 0 16px 36px rgba(20, 126, 231, .32), inset 0 1px 0 rgba(255, 255, 255, .3) !important;
  outline: none !important;
  transform: translateY(-2px) !important;
}

#rw-social-fab .rw-social-fab__toggle:active {
  transform: translateY(0) scale(.97) !important;
}

#rw-social-fab .rw-social-fab__toggle:focus-visible {
  box-shadow: 0 0 0 4px rgba(49, 213, 255, .24), 0 16px 36px rgba(20, 126, 231, .32) !important;
}

#rw-social-fab .rw-social-fab__glyph {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 25px !important;
  height: 25px !important;
}

#rw-social-fab .rw-social-fab__glyph svg {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 25px !important;
  height: 25px !important;
  transition: opacity .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1) !important;
}

#rw-social-fab .rw-social-fab__icon--close {
  opacity: 0 !important;
  transform: rotate(-55deg) scale(.7) !important;
}

#rw-social-fab[data-open="true"] .rw-social-fab__icon--network {
  opacity: 0 !important;
  transform: rotate(55deg) scale(.72) !important;
}

#rw-social-fab[data-open="true"] .rw-social-fab__icon--close {
  opacity: 1 !important;
  transform: rotate(0) scale(1) !important;
}

#rw-social-fab .rw-social-fab__menu {
  position: absolute !important;
  z-index: 2 !important;
  left: 60px !important;
  right: auto !important;
  bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  width: max-content !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 5px !important;
  list-style: none !important;
  border: 1px solid var(--rw-social-border) !important;
  border-radius: 18px !important;
  background: var(--rw-social-bg) !important;
  box-shadow: 0 16px 38px rgba(8, 57, 119, .2), inset 0 1px 0 rgba(255, 255, 255, .82) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.22) !important;
  backdrop-filter: blur(18px) saturate(1.22) !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-12px) scale(.94) !important;
  transform-origin: left center !important;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s !important;
}

#rw-social-fab[data-open="true"] .rw-social-fab__menu {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(0) scale(1) !important;
  transition-delay: 0s !important;
}

#rw-social-fab .rw-social-fab__item {
  position: relative !important;
  display: block !important;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  opacity: 0 !important;
  transform: translateX(-9px) scale(.82) !important;
  transition: opacity .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1) !important;
}

#rw-social-fab[data-open="true"] .rw-social-fab__item {
  opacity: 1 !important;
  transform: translateX(0) scale(1) !important;
}

#rw-social-fab[data-open="true"] .rw-social-fab__item:nth-child(1) { transition-delay: .03s !important; }
#rw-social-fab[data-open="true"] .rw-social-fab__item:nth-child(2) { transition-delay: .07s !important; }
#rw-social-fab[data-open="true"] .rw-social-fab__item:nth-child(3) { transition-delay: .11s !important; }
#rw-social-fab[data-open="true"] .rw-social-fab__item:nth-child(4) { transition-delay: .15s !important; }

#rw-social-fab .rw-social-fab__link {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--rw-social-muted) !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  border-radius: 13px !important;
  background: transparent !important;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
}

#rw-social-fab .rw-social-fab__link:hover,
#rw-social-fab .rw-social-fab__link:focus-visible {
  color: var(--rw-social-accent) !important;
  border-color: rgba(44, 166, 246, .34) !important;
  background: var(--rw-social-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58) !important;
  outline: none !important;
  transform: translateY(-2px) !important;
}

#rw-social-fab .rw-social-fab__link:active {
  transform: translateY(0) scale(.96) !important;
}

#rw-social-fab .rw-social-fab__link:focus-visible {
  box-shadow: 0 0 0 3px rgba(49, 213, 255, .24) !important;
}

#rw-social-fab .rw-social-fab__link svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
}

#rw-social-fab .rw-social-fab__label {
  position: absolute !important;
  left: 50% !important;
  bottom: calc(100% + 10px) !important;
  z-index: 5 !important;
  display: block !important;
  width: max-content !important;
  max-width: 180px !important;
  padding: 7px 10px !important;
  overflow: hidden !important;
  color: var(--rw-social-text) !important;
  font: 700 11px/1.5 RasaSans, Tahoma, sans-serif !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  border: 1px solid var(--rw-social-border) !important;
  border-radius: 10px !important;
  background: var(--rw-social-bg) !important;
  box-shadow: 0 10px 24px rgba(8, 57, 119, .16) !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, 5px) !important;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s !important;
}

#rw-social-fab .rw-social-fab__link:hover .rw-social-fab__label,
#rw-social-fab .rw-social-fab__link:focus-visible .rw-social-fab__label {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
  transition-delay: 0s !important;
}

#rw-social-fab .rw-social-fab__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html.theme-dark #rw-social-fab,
html.dark #rw-social-fab,
body.theme-dark #rw-social-fab,
body.dark-mode #rw-social-fab {
  --rw-social-bg: rgba(7, 27, 57, .94);
  --rw-social-surface: rgba(24, 83, 145, .4);
  --rw-social-border: rgba(91, 185, 255, .31);
  --rw-social-text: #edf8ff;
  --rw-social-muted: #a7c1dd;
  --rw-social-accent: #5cddff;
}

/* Keep the shared back-to-top control close to the viewport edge. The theme
 * defaults are intentionally conservative, but leave an oversized gap on
 * short/cropped viewports and can be changed by locale-specific CSS. */
html body #backToTop.back-to-top {
  bottom: 10px !important;
}

@media (max-width: 720px) {
  /* The theme mirrors this control in LTR and can place it directly over the
     intentionally physical-left social launcher. Keep the two actions on
     opposite sides at touch widths. */
  #backToTop.back-to-top,
  #backToTop {
    left: auto !important;
    right: 12px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
  }

  #rw-social-fab.rw-social-fab {
    left: 12px !important;
    bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    width: 48px !important;
    height: 48px !important;
  }

  body:has(#rwCookie.show) #rw-social-fab.rw-social-fab,
  body.rw-social-cookie-open #rw-social-fab.rw-social-fab {
    bottom: calc(252px + env(safe-area-inset-bottom)) !important;
  }

  #rw-social-fab .rw-social-fab__toggle {
    width: 48px !important;
    height: 48px !important;
    border-radius: 15px !important;
  }

  #rw-social-fab .rw-social-fab__menu {
    left: 55px !important;
    min-height: 48px !important;
    padding: 4px !important;
    border-radius: 16px !important;
  }

  #rw-social-fab .rw-social-fab__item,
  #rw-social-fab .rw-social-fab__link {
    width: 40px !important;
    height: 40px !important;
  }

  #rw-social-fab .rw-social-fab__label {
    display: none !important;
  }
}

@media (max-width: 340px) {
  #rw-social-fab .rw-social-fab__menu {
    gap: 2px !important;
  }

  #rw-social-fab .rw-social-fab__item,
  #rw-social-fab .rw-social-fab__link {
    width: 36px !important;
    height: 40px !important;
  }
}

@media print {
  #rw-social-fab {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #rw-social-fab,
  #rw-social-fab * {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

@keyframes rw-social-pulse {
  0%, 62% { opacity: 0; transform: scale(.92); }
  72% { opacity: .72; }
  100% { opacity: 0; transform: scale(1.32); }
}
