/* ==========================================================
   BiosMed – Botones de WhatsApp
   Ubicación recomendada: /wp-content/themes/TU-CHILD-THEME/css/whatsapp-buttons.css
   ========================================================== */

:root {
  --wa-green: #25D366;
  --wa-green-dark: #1EBE5D;
}

/* ----------------------------------------------------------
   1) Botón superior "Cotiza por WhatsApp"
   Fijo en la esquina superior derecha. Oculto en móvil (<768px)
   para no chocar con el ícono del menú hamburguesa del tema.
   ---------------------------------------------------------- */
.biosmed-wa-header {
  display: none; /* se activa desde 768px, ver media query abajo */
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 999999;
  align-items: center;
  gap: 8px;
  background-color: var(--wa-green);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 8px; /* bordes ligeramente redondeados */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.biosmed-wa-header:hover,
.biosmed-wa-header:focus {
  background-color: var(--wa-green-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.biosmed-wa-header__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  color: #ffffff;
}

.biosmed-wa-header__text {
  display: inline-block;
}

/* Mostrar el botón superior desde tablet hacia arriba */
@media (min-width: 768px) {
  .biosmed-wa-header {
    display: inline-flex;
  }
}

/* En pantallas medianas, reducir un poco el padding/texto */
@media (min-width: 768px) and (max-width: 1024px) {
  .biosmed-wa-header {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* Ajuste si el usuario está logueado y la admin bar de WordPress está visible */
body.admin-bar .biosmed-wa-header {
  top: 46px;
}
@media (max-width: 782px) {
  /* La admin bar de WP en móvil no es fija en la misma posición */
  body.admin-bar .biosmed-wa-header {
    top: 14px;
  }
}

/* ----------------------------------------------------------
   2) Botón flotante circular
   Fijo en la esquina inferior derecha. Visible en todos los
   tamaños de pantalla (es el acceso principal en móvil).
   ---------------------------------------------------------- */
.biosmed-wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  /* Respeta el "notch"/home indicator en iPhones recientes */
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 999998;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--wa-green);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.biosmed-wa-float:hover,
.biosmed-wa-float:focus {
  background-color: var(--wa-green-dark);
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.biosmed-wa-float__icon {
  width: 30px;
  height: 30px;
  color: #ffffff;
  display: block;
}

/* Tamaño y margen adecuados en móviles pequeños */
@media (max-width: 480px) {
  .biosmed-wa-float {
    width: 52px;
    height: 52px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
  }

  .biosmed-wa-float__icon {
    width: 26px;
    height: 26px;
  }
}
