/*
 * Academics.Solutions shared WhatsApp widget styles.
 * Identical copies: academics/pages/static/pages/css/whatsapp-widget.css and
 * academics.solutions/static/css/whatsapp-widget.css. Keep them in sync.
 *
 * Position is controlled by CSS variables so each site can clear its own
 * fixed controls (scroll-to-top, language switcher, cookie bars).
 */
.wa-widget {
  --wa-green: #25d366;
  --wa-green-dark: #1ebe5d;
  --wa-ink: #0f1f17;
  --wa-offset-x: 18px;
  --wa-offset-y: 18px;
  --wa-size: 56px;
  --wa-z: 85;
  position: fixed;
  right: var(--wa-offset-x);
  bottom: var(--wa-offset-y);
  z-index: var(--wa-z);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  font-family: inherit;
  direction: ltr;
}
html[dir="rtl"] .wa-widget,
.wa-widget[dir="rtl"] {
  right: auto;
  left: var(--wa-offset-x);
  flex-direction: row-reverse;
  direction: rtl;
}
.wa-widget__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--wa-size);
  height: var(--wa-size);
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .28);
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
  outline-offset: 3px;
}
.wa-widget__button:hover,
.wa-widget__button:focus-visible {
  background: var(--wa-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(16, 24, 40, .32);
}
.wa-widget__button:focus-visible {
  outline: 3px solid #0d5c3a;
}
.wa-widget__icon {
  width: 30px;
  height: 30px;
  fill: currentColor;
  display: block;
}
.wa-widget__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Gentle pulse once on load; disabled for users who prefer reduced motion. */
.wa-widget__button::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, .55);
  animation: wa-pulse 2.4s ease-out 1.2s 2;
  pointer-events: none;
}
@keyframes wa-pulse {
  0% { transform: scale(.9); opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-widget__button::after { animation: none; }
  .wa-widget__button, .wa-widget__bubble { transition: none; }
}
/* Invitation bubble (desktop and tablet). */
.wa-widget__bubble {
  position: relative;
  max-width: 260px;
  padding: 12px 36px 12px 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--wa-ink);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .18);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  cursor: pointer;
}
html[dir="rtl"] .wa-widget__bubble,
.wa-widget[dir="rtl"] .wa-widget__bubble {
  padding: 12px 14px 12px 36px;
  text-align: right;
  font-family: "Cairo", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
}
.wa-widget--invite .wa-widget__bubble {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.wa-widget__dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
html[dir="rtl"] .wa-widget__dismiss,
.wa-widget[dir="rtl"] .wa-widget__dismiss {
  right: auto;
  left: 6px;
}
.wa-widget__dismiss:hover,
.wa-widget__dismiss:focus-visible { color: var(--wa-ink); background: #f3f4f6; }
@media (max-width: 640px) {
  .wa-widget { --wa-size: 52px; }
  .wa-widget__bubble { display: none; }
}
@media print {
  .wa-widget { display: none !important; }
}
