/* ==========================================================================
   Share Buttons Component
   ========================================================================== */

.share-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: var(--space-lg) 0;
}

.share-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-right: var(--space-xs);
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-background);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

@media (min-width: 768px) {
  .share-btn {
    width: 44px;
    height: 44px;
  }
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.share-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--color-text-muted);
  transition: fill var(--transition-fast);
}

@media (min-width: 768px) {
  .share-btn svg {
    width: 22px;
    height: 22px;
  }
}

/* X (Twitter) */
.share-btn--x:hover {
  background-color: var(--color-x);
}

.share-btn--x:hover svg {
  fill: white;
}

/* Instagram */
.share-btn--instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-btn--instagram:hover svg {
  fill: white;
}

/* TikTok */
.share-btn--tiktok:hover {
  background-color: var(--color-tiktok-primary);
}

.share-btn--tiktok:hover svg {
  fill: var(--color-tiktok-accent);
}

/* YouTube */
.share-btn--youtube:hover {
  background-color: var(--color-youtube);
}

.share-btn--youtube:hover svg {
  fill: white;
}

/* Copy Link */
.share-btn--copy:hover {
  background-color: var(--color-accent);
}

.share-btn--copy:hover svg {
  fill: white;
}

/* Copy Tooltip */
.share-btn--copy {
  position: relative;
}

.share-btn--copy::after {
  content: 'Enlace copiado';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-primary);
  color: white;
  font-size: var(--fs-xs);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.share-btn--copy.copied::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 8px);
}

/* Floating Share Bar (Desktop)
   ========================================================================== */
.share-floating {
  display: none;
}

@media (min-width: 1200px) {
  .share-floating {
    position: fixed;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    z-index: 100;
  }

  .share-floating .share-btn {
    box-shadow: var(--shadow-md);
  }
}

/* Share on Article Header
   ========================================================================== */
.share-inline {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.share-inline .share-btn {
  width: 32px;
  height: 32px;
}

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