/* Botón «Avisar por WhatsApp»: un solo aspecto para todos los enlaces wa.me del cliente y del panel.
   Verde de WhatsApp con letra oscura (el blanco sobre este verde no cumple contraste).
   Se carga DESPUÉS de las hojas de cada página; los selectores llevan "html body" y la clase
   repetida para ganar sin tocar las hojas de marca, cliente ni panel. */
:root {
  --wa-verde: #25D366;
  --wa-verde-hover: #1FB958;
  --wa-texto: #10222B;
  --wa-blanco: #FFFFFF;
  --wa-halo: rgba(37, 211, 102, 0.55);
  --wa-halo-fin: rgba(37, 211, 102, 0);
  /* Botón ya usado («Avisado a las…»): gris, sigue funcionando. Texto 5.4:1 sobre el fondo. */
  --wa-usado-fondo: #E6EAEC;
  --wa-usado-fondo-hover: #D9DFE2;
  --wa-usado-texto: #3E4F59;
  --wa-usado-borde: #7D8E99;
}

html body .boton-whatsapp.boton-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 28rem;
  min-height: 48px;
  margin: 0.75rem 0;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 12px;
  background: var(--wa-verde);
  color: var(--wa-texto);
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* Páginas del cliente (columna de 560 px): el botón grande ocupa todo el ancho, igual que
   «Cambiar día u hora» y «Cancelar la cita». El panel conserva su max-width de 28rem. */
html body.cliente .boton-whatsapp.boton-whatsapp:not(.boton-whatsapp--compacto) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}

html body .boton-whatsapp.boton-whatsapp--compacto {
  min-height: 44px;
  margin: 0.5rem 0;
  padding: 0.5rem 0.9rem;
}

/* Ya se abrió WhatsApp desde este botón: gris, con la hora. No afirma que se envió. */
html body .boton-whatsapp.boton-whatsapp--usado {
  border: 1px solid var(--wa-usado-borde);
  background: var(--wa-usado-fondo);
  color: var(--wa-usado-texto);
  font-weight: 600;
}

html body .boton-whatsapp.boton-whatsapp:focus-visible {
  outline: 3px solid var(--wa-texto);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--wa-blanco);
}

.icono-whatsapp {
  flex: none;
  width: 1.4em;
  height: 1.4em;
}

@media (hover: hover) {
  html body .boton-whatsapp.boton-whatsapp:hover {
    background: var(--wa-verde-hover);
    color: var(--wa-texto);
  }

  html body .boton-whatsapp.boton-whatsapp--usado:hover {
    background: var(--wa-usado-fondo-hover);
    color: var(--wa-usado-texto);
  }
}

/* Latido: un halo que crece y se apaga, 3 veces y se detiene. Solo sin "reducir movimiento". */
@keyframes wa-latido {
  from { box-shadow: 0 0 0 0 var(--wa-halo); }
  to { box-shadow: 0 0 0 14px var(--wa-halo-fin); }
}

@media (prefers-reduced-motion: no-preference) {
  html body .boton-whatsapp.boton-whatsapp--late {
    animation: wa-latido 1.6s ease-out 3;
  }
}
