/* Share Buttons Styles */

.share-buttons {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin: 12px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;  /* WCAG 2.1 AA: minimum touch target 44x44px */
  height: 44px;
  border-radius: 8px;
  border: 2px solid rgba(0, 160, 220, 0.3);
  background: rgba(0, 160, 220, 0.1);
  color: var(--cyan-400, #2BBFED);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Clean Nordic: Efecto de brillo removido para mantener minimalismo */

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 160, 220, 0.4);
  border-color: var(--cyan-500, #00A0DC);
  background: rgba(0, 160, 220, 0.2);
}

.share-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 160, 220, 0.3);
}

.share-btn:focus {
  outline: 2px solid var(--cyan-500, #00A0DC);
  outline-offset: 2px;
}

/* Colores específicos por plataforma */
.share-twitter:hover {
  background: rgba(29, 155, 240, 0.2);
  border-color: #1DA1F2;
  color: #1DA1F2;
}

.share-facebook:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: #1877F2;
  color: #1877F2;
}

.share-linkedin:hover {
  background: rgba(10, 102, 194, 0.2);
  border-color: #0A66C2;
  color: #0A66C2;
}

.share-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: #25D366;
  color: #25D366;
}

.share-telegram:hover {
  background: rgba(42, 171, 238, 0.2);
  border-color: #2AABEE;
  color: #2AABEE;
}

.share-copy:hover {
  background: rgba(109, 213, 250, 0.2);
  border-color: var(--cyan-lighter, #6DD5FA);
  color: var(--cyan-lighter, #6DD5FA);
}

.share-copy.copied {
  background: rgba(52, 211, 153, 0.2);
  border-color: #34D399;
  color: #34D399;
}

/* Sprint 3.3: Share dropdown for mobile */
.share-dropdown {
  position: relative;
  display: none; /* Hidden by default, shown on mobile */
}

.share-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 2px solid rgba(0, 160, 220, 0.3);
  background: rgba(0, 160, 220, 0.1);
  color: var(--cyan-400, #2BBFED);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

.share-dropdown-toggle:hover {
  background: rgba(0, 160, 220, 0.2);
  border-color: var(--cyan-500, #00A0DC);
}

.share-dropdown-toggle svg {
  transition: transform 0.3s ease;
}

.share-dropdown.open .share-dropdown-toggle svg {
  transform: rotate(180deg);
}

.share-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15, 35, 55, 0.98);
  border: 2px solid rgba(0, 160, 220, 0.4);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.share-dropdown.open .share-dropdown-menu {
  display: flex;
}

.share-dropdown-menu .share-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 12px;
}

.share-dropdown-menu .share-btn span {
  font-size: 14px;
  font-weight: 600;
}

/* Responsive - maintain WCAG 2.1 AA compliance */
@media (max-width: 768px) {
  .share-buttons {
    gap: 8px;
  }

  .share-btn {
    width: 44px;  /* Keep 44px for WCAG compliance */
    height: 44px;
  }
}

@media (max-width: 480px) {
  /* Sprint 3.3: Show dropdown, hide individual buttons on mobile */
  .share-buttons {
    position: relative;
  }

  .share-buttons > .share-btn {
    display: none; /* Hide individual buttons */
  }

  .share-dropdown {
    display: block; /* Show dropdown */
  }

  .share-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Animación de copia exitosa */
@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.share-copy.copied svg {
  animation: checkmark 0.3s ease;
}
