/* WhatsApp chat window for the whole site (front/partials/wa-chat.blade.php). Self-contained ahg-wa classes,
   so the site's Bootstrap and the landing page styles do not reach in. */
.ahg-wa { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 9990; font-family: 'Outfit', 'Outfit Fallback', system-ui, sans-serif; }
.ahg-wa [hidden] { display: none !important; }
.ahg-wa-button { width: 58px; height: 58px; border-radius: 50%; border: 0; background: #25d366; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(37,211,102,.45); transition: transform .25s ease; padding: 0; }
.ahg-wa-button:hover { transform: scale(1.06); }
.ahg-wa-button:focus-visible, .ahg-wa button:focus-visible, .ahg-wa a:focus-visible { outline: 2px solid #075e54; outline-offset: 3px; }

/* Small bubble on pages other than the landing pages */
.ahg-wa-teaser { position: absolute; right: 0; bottom: 70px; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; box-shadow: 0 10px 30px rgba(14,36,39,.18); padding: 6px 6px 6px 16px; white-space: nowrap; animation: ahg-wa-in .35s ease; }
.ahg-wa-teaser-open { background: none; border: 0; padding: 6px 0; font-weight: 600; font-size: .92rem; line-height: 1.2; font-family: inherit; color: #0e2427; cursor: pointer; }
.ahg-wa-teaser-open::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #25d366; margin-right: 8px; vertical-align: 1px; }
.ahg-wa-teaser-close { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #f0f3f3; color: #3c5457; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }

/* Message window */
.ahg-wa-window { position: absolute; right: 0; bottom: 74px; width: min(340px, calc(100vw - 32px)); border-radius: 14px; overflow: hidden; background: #e5ddd5; box-shadow: 0 18px 50px rgba(14,36,39,.28); transform-origin: bottom right; animation: ahg-wa-in .3s ease; }
@keyframes ahg-wa-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.ahg-wa-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: #075e54; color: #fff; }
.ahg-wa-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; }
.ahg-wa-head-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.ahg-wa-head-text strong { font-size: 1rem; }
.ahg-wa-head-text small { color: #cfe9e5; font-size: .82rem; }
.ahg-wa-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 6px; }
.ahg-wa-body { padding: 18px 16px 8px; }
.ahg-wa-bubble { margin: 0; background: #fff; border-radius: 0 10px 10px 10px; padding: 10px 12px; font-size: .95rem; line-height: 1.5; color: #1f2c2e; box-shadow: 0 1px 1px rgba(0,0,0,.12); max-width: 88%; animation: ahg-wa-in .4s .15s ease both; }
.ahg-wa-compose { display: flex; align-items: flex-end; gap: 10px; padding: 10px 12px 10px; background: #f0f0f0; margin: 0; }
.ahg-wa-compose textarea { flex: 1; resize: none; border: 1px solid #d5d5d5; border-radius: 20px; padding: 10px 14px; font-weight: 400; font-size: .95rem; line-height: 1.4; font-family: inherit; color: #1f2c2e; background: #fff; max-height: 120px; }
.ahg-wa-compose textarea:focus { outline: 2px solid #25d366; outline-offset: 1px; }
.ahg-wa-send { width: 44px; height: 44px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; text-decoration: none; flex: none; }
.ahg-wa-send:hover { color: #fff; background: #1ebe5a; }
.ahg-wa-fallback { margin: 0; padding: 0 12px 12px; background: #f0f0f0; font-size: .82rem; color: #3c5457; text-align: center; }
.ahg-wa-fallback button { background: none; border: 0; padding: 0; color: #075e54; font-weight: 600; font-size: .82rem; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ahg-wa-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Landing pages have a WhatsApp / proposal bar at the bottom on phones: sit above it */
@media (max-width: 960px) {
  body:has(.lp-dock) .ahg-wa { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 768px) {
  .ahg-wa-button { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .ahg-wa *, .ahg-wa { animation: none !important; transition: none !important; }
}
