/* =========================================================================
   GastroView · Botón flotante de WhatsApp
   Verde WhatsApp profundizado (el mismo del Bloque 2, AA con texto claro),
   con un punto terracota de aviso y un globo en materiales de la marca.
   ========================================================================= */
.wapp {
  position: fixed;
  right: clamp(16px, 2.4vw, 28px);
  bottom: clamp(16px, 2.4vw, 28px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}
.wapp > * { pointer-events: auto; }

/* ---------- Botón ---------- */
.wapp__boton {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* v16 · verde más claro y fresco; el ícono blanco mantiene 3,3:1 (AA para gráficos) */
  background: linear-gradient(180deg, #34BE77, #22A05C 58%, #178B4D);
  color: var(--blanco-calido);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.22),
    0 14px 30px -12px rgb(23 139 77 / 0.6),
    0 0 0 8px rgb(52 190 119 / 0.16);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), filter var(--t) var(--ease);
}
.wapp__boton:hover { filter: brightness(1.05); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 18px 34px -12px rgb(23 139 77 / 0.7), 0 0 0 10px rgb(52 190 119 / 0.22); }
.wapp__boton:active { transform: translateY(1px); }
.wapp__boton svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.wapp__boton svg path + path { fill: currentColor; stroke: none; }

/* Aviso: el "1" que llama la atención */
.wapp__aviso {
  position: absolute;
  top: -2px; right: -2px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--terracota-cta);
  box-shadow: 0 0 0 2px #2B1F19, 0 4px 10px -4px rgb(0 0 0 / 0.6);
  font-family: var(--f-ui);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--blanco-calido);
  animation: wapp-latido 2.6s ease-in-out infinite;
}
.wapp__aviso[hidden] { display: none; }
@keyframes wapp-latido {
  0%, 72%, 100% { transform: scale(1); }
  80% { transform: scale(1.14); }
  88% { transform: scale(0.98); }
}

/* ---------- Globo ---------- */
.wapp__globo {
  position: relative;
  width: min(300px, calc(100vw - 32px));
  padding: 20px 20px 18px;
  border-radius: 20px 20px 6px 20px;
  background: var(--blanco-calido);
  box-shadow:
    inset 0 0 0 1px rgb(var(--espresso-rgb) / 0.08),
    0 30px 60px -28px rgb(var(--espresso-rgb) / 0.75);
  animation: wapp-entra 260ms var(--ease) both;
}
.wapp__globo[hidden] { display: none; }
@keyframes wapp-entra { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

.wapp__cerrar {
  position: absolute;
  top: 8px; right: 8px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgb(var(--espresso-rgb) / 0.5);
  cursor: pointer;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.wapp__cerrar:hover { color: var(--espresso); background: var(--crema); }
.wapp__cerrar svg { width: 18px; height: 18px; }

.wapp__saludo {
  margin: 0 22px 6px 0;
  font-family: var(--f-titulos);
  font-size: 1.0625rem;
  font-weight: 500;
  font-variation-settings: "opsz" 72;
  line-height: 1.25;
  color: var(--espresso);
}
.wapp__texto {
  margin: 0 0 16px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--taupe-texto);
  text-wrap: pretty;
}
.wapp__ir {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  background: #17804A;            /* el botón lleva texto: se mantiene en AA (4,9:1) */
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--blanco-calido);
  text-decoration: none;
  transition: background-color var(--t) var(--ease);
}
.wapp__ir:hover { background: #12703F; }

@media (max-width: 599px) {
  .wapp__boton { width: 54px; height: 54px; }
  .wapp__boton svg { width: 27px; height: 27px; }
  .wapp__globo { padding: 18px 18px 16px; border-radius: 18px 18px 6px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .wapp__aviso { animation: none; }
  .wapp__globo { animation: none; }
}
