/* ===================================================
   Beet WhatsApp Multi — Frontend Styles
=================================================== */

/* -------  Shortcode  ------- */
.bwm-shortcode {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bwm-sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 10px 18px;
  border-radius: 50px;
  text-decoration: none;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 3px 10px rgba(37,211,102,.35);
}
.bwm-sc-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,211,102,.4);
  color: #fff;
  text-decoration: none;
}
.bwm-sc-btn__icon { width: 20px; height: 20px; flex-shrink: 0; }
.bwm-sc-btn__icon svg { width: 100%; height: 100%; }

/* -------  Floating widget  ------- */
.bwm-widget {
  position: fixed;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.bwm-widget--bottom-right { bottom: 24px; right: 24px; align-items: flex-end; }
.bwm-widget--bottom-left  { bottom: 24px; left: 24px;  align-items: flex-start; }
.bwm-widget--top-right    { top: 24px;    right: 24px; align-items: flex-end; flex-direction: column-reverse; }
.bwm-widget--top-left     { top: 24px;    left: 24px;  align-items: flex-start; flex-direction: column-reverse; }

@media (max-width: 640px) {
  .bwm-widget--hide-mobile { display: none !important; }
}

/* --- Panel --- */
.bwm-panel {
  width: 300px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  overflow: hidden;
  margin-bottom: 12px;
  transform-origin: bottom right;
  animation: bwmPanelIn .22s cubic-bezier(.34,1.56,.64,1);
}
.bwm-widget--bottom-left  .bwm-panel,
.bwm-widget--top-left     .bwm-panel { transform-origin: bottom left; }
.bwm-widget--top-right    .bwm-panel,
.bwm-widget--top-left     .bwm-panel { transform-origin: top right; margin-bottom: 0; margin-top: 12px; }

@keyframes bwmPanelIn {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.bwm-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #075E54;
  padding: 14px 16px;
  color: #fff;
}
.bwm-panel__avatar {
  width: 42px; height: 42px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bwm-panel__avatar svg { width: 24px; height: 24px; }
.bwm-panel__info { flex: 1; }
.bwm-panel__info strong { display: block; font-size: .95rem; }
.bwm-panel__info span   { font-size: .75rem; opacity: .8; }
.bwm-panel__close {
  background: none; border: none; color: #fff;
  cursor: pointer; font-size: 1rem; opacity: .7; padding: 4px;
  line-height: 1;
  transition: opacity .15s;
}
.bwm-panel__close:hover { opacity: 1; }

.bwm-panel__list {
  list-style: none;
  margin: 0; padding: 8px 0;
  max-height: 320px;
  overflow-y: auto;
}
.bwm-panel__list::-webkit-scrollbar { width: 4px; }
.bwm-panel__list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.bwm-panel__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #1a202c;
  transition: background .15s;
}
.bwm-panel__item:hover { background: #f0fdf4; text-decoration: none; }
.bwm-panel__item-icon {
  width: 38px; height: 38px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.bwm-panel__item-icon svg { width: 20px; height: 20px; }
.bwm-panel__item-text { flex: 1; }
.bwm-panel__item-text strong { display: block; font-size: .9rem; font-weight: 600; }
.bwm-panel__item-text small  { color: #718096; font-size: .78rem; }
.bwm-panel__item-arrow { color: #25D366; font-size: 1rem; }

/* --- Bubble button --- */
.bwm-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bwm-color, #25D366);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 20px 12px 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  font-size: .9rem;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.bwm-bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(37,211,102,.55);
}

.bwm-bubble__icon { width: 26px; height: 26px; flex-shrink: 0; }
.bwm-bubble__icon svg { width: 100%; height: 100%; }
.bwm-bubble__icon--close { display: none; }

/* Open state */
.bwm-widget.is-open .bwm-bubble__icon--wa   { display: none; }
.bwm-widget.is-open .bwm-bubble__icon--close { display: flex; align-items: center; justify-content: center; font-size: 1rem; }

/* Pulse animation */
@keyframes bwmPulse {
  0%   { box-shadow: 0 0 0 0   rgba(37,211,102,.55); }
  70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0);  }
  100% { box-shadow: 0 0 0 0   rgba(37,211,102,0);   }
}
.bwm-widget--pulse .bwm-bubble:not(:hover) {
  animation: bwmPulse 2.4s ease-out infinite;
}
