/* Floating WhatsApp launcher - andsocialmedia.
   Cloned from socialbar.net's launcher (assets/socialbar-whatsapp-chat.css)
   and restyled with this site's BOBENTO 2026 palette so it reads as part of
   andsocialmedia rather than a bolt-on. Behaviour and layout are unchanged. */

.asm-chat {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 9000;
  font-family: var(--font-body);
  color: var(--ink);
}
.asm-chat, .asm-chat * { box-sizing: border-box; }

.asm-chat__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 16px 7px 8px;
  border: 1px solid var(--lime);
  border-radius: var(--radius-pill);
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(24, 24, 26, 0.18);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.asm-chat__launcher:hover {
  transform: translateY(-2px);
  background: var(--lime);
  color: var(--dark);
  box-shadow: 0 14px 34px rgba(24, 24, 26, 0.24);
}
.asm-chat__launcher:focus-visible,
.asm-chat__close:focus-visible,
.asm-chat__link:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.asm-chat__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  flex: none;
}
.asm-chat__icon svg { width: 22px; height: 22px; }
.asm-chat__launcher-label { white-space: nowrap; }

.asm-chat__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(340px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-hover);
}
.asm-chat__panel[hidden] { display: none; }

.asm-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: var(--dark);
  color: var(--white);
}
.asm-chat__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.asm-chat__close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.asm-chat__close:hover { background: rgba(255, 255, 255, 0.26); }

.asm-chat__body { padding: 18px; }
.asm-chat__message {
  margin: 0 0 15px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.asm-chat__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
}
.asm-chat__link svg { width: 18px; height: 18px; flex: none; }
.asm-chat__link--wa { background: #25d366; color: #132b1d !important; }
.asm-chat__link--wa:hover { background: #1fbe5b; color: #132b1d !important; }
.asm-chat__link--support { background: var(--dark); color: var(--white) !important; }
.asm-chat__link--support:hover { background: var(--lime); color: var(--dark) !important; }

.asm-chat__note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

/* The checkout modal and the mobile nav drawer both set body.has-modal.
   Stay out of the way while either is open. */
body.has-modal .asm-chat { display: none; }

@media (max-width: 600px) {
  .asm-chat { right: 14px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .asm-chat__launcher { width: 54px; height: 54px; padding: 7px; }
  .asm-chat__launcher-label { display: none; }
  .asm-chat__icon { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .asm-chat__launcher { transition: none; }
}
