/* ==========================================================================
   WHATSAPP-CTA.CSS - styles for the "Hello Programmer" bar shown above the
   floating WhatsApp button (includes/whatsapp-cta.php).
   Prefix: wa-hello-
   Loaded automatically by the include (once per page) - no page needs to
   link it. global.css is not touched.
   Stack from bottom to top (right side of screen):
     WhatsApp icon -> Hello bar -> Back-to-top arrow
   ========================================================================== */

.wa-hello-bar {
  position: fixed;
  right: 28px;
  bottom: 94px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 56px);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  animation: waHelloIn 0.5s ease 1.2s both, waHelloFloat 3.2s ease-in-out 1.7s infinite;
}

/* Small tail pointing down to the WhatsApp icon */
.wa-hello-bar::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transform: rotate(45deg);
}

.wa-hello-bar:hover { color: var(--text-primary); border-color: #25D366; }

.wa-hello-wave {
  display: inline-block;
  font-size: 1rem;
  transform-origin: 70% 70%;
  animation: waHelloWave 2.4s ease-in-out infinite;
}

/* Back-to-top arrow moved up so it never touches the bar */
#back-to-top { bottom: 150px; }

@keyframes waHelloIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes waHelloFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

@keyframes waHelloWave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30%      { transform: rotate(16deg); }
  20%, 40%      { transform: rotate(-10deg); }
  50%           { transform: rotate(8deg); }
}

@media (max-width: 575px) {
  .wa-hello-bar { right: 16px; bottom: 86px; font-size: 0.72rem; padding: 7px 12px; }
  .wa-hello-bar::after { right: 18px; }
  #back-to-top { bottom: 140px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-hello-bar, .wa-hello-wave { animation: none; }
}
