/* Contenedor principal flotante */
.share-notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  padding: 6px 6px 6px 16px;
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  font-family: sans-serif;
  z-index: 9999;

  /* Agregamos una transición rápida exclusiva para 'bottom' para que el JavaScript se mueva fluido */
  transition: bottom 0.1s ease-out, all 0.6s cubic-bezier(0.25, 1, 0.5, 1);

  max-width: 500px;
  overflow: hidden;
}

/* Estado Colapsado (Burbuja perfecta) */
.share-notification-container.collapsed {
  padding: 6px;
  border-radius: 50%;
  max-width: 54px;
  /* Abraza exactamente al botón circular */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Envoltura del texto que controla el deslizamiento suave */
.share-text-wrapper {
  display: flex;
  align-items: center;
  max-width: 300px;
  /* Tamaño máximo del texto */
  opacity: 1;
  transform: translateX(0);
  /* Sincronizado con el contenedor para ir a la misma velocidad */
  transition: max-width 0.6s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.4s ease,
    transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Cuando se colapsa, el texto se desliza y se esconde de manera impecable */
.share-notification-container.collapsed .share-text-wrapper {
  max-width: 0;
  opacity: 0;
  transform: translateX(15px);
  /* Pequeño efecto de desplazamiento hacia la derecha */
}

/* El texto interior */
.share-text {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  margin-right: 14px;
  white-space: nowrap;
}

/* El botón circular */
.share-btn {
  background-color: #007bff;
  color: #ffffff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  /* Evita que el botón cambie de forma al encogerse */
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* Animación de entrada inicial al cargar la página (Suave pop-up hacia arriba) */
@keyframes smoothFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.share-notification-container {
  animation: smoothFadeIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}