/**
 * Social Share Buttons - 2026 UX Enhancement
 *
 * Modern, accessible share buttons for articles and content.
 * Supports: Facebook, Twitter/X, LinkedIn, WhatsApp, Email, Copy Link
 */

/* ===== SHARE CONTAINER ===== */
.social-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-share__label {
  font-family: var(--font-ui, 'Montserrat', sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.5rem;
}

/* ===== SHARE BUTTONS ===== */
.social-share__buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.social-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-share__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-share__btn:focus-visible {
  outline: 2px solid var(--accent-color, #d4af37);
  outline-offset: 2px;
}

/* Platform-specific colors on hover */
.social-share__btn--facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.social-share__btn--twitter:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.social-share__btn--linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}

.social-share__btn--whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.social-share__btn--email:hover {
  background: var(--accent-color, #d4af37);
  border-color: var(--accent-color, #d4af37);
  color: #000;
}

.social-share__btn--copy:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--accent-color, #d4af37);
  color: var(--accent-color, #d4af37);
}

/* Copy success state */
.social-share__btn--copy.copied {
  background: rgba(46, 204, 113, 0.2);
  border-color: #2ecc71;
  color: #2ecc71;
}

/* ===== COMPACT VARIANT ===== */
.social-share--compact .social-share__btn {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
  border-radius: 6px;
}

.social-share--compact .social-share__label {
  font-size: 0.75rem;
}

/* ===== INLINE VARIANT (for article headers) ===== */
.social-share--inline {
  display: inline-flex;
  gap: 0.5rem;
}

.social-share--inline .social-share__label {
  display: none;
}

/* ===== VERTICAL VARIANT (for sidebars) ===== */
.social-share--vertical {
  flex-direction: column;
  align-items: flex-start;
}

.social-share--vertical .social-share__buttons {
  flex-direction: column;
}

/* ===== FLOATING SHARE BAR (for long articles) ===== */
.social-share--floating {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.social-share--floating.visible {
  opacity: 1;
  visibility: visible;
}

.social-share--floating .social-share__label {
  display: none;
}

.social-share--floating .social-share__buttons {
  flex-direction: column;
}

/* ===== TOOLTIP FOR COPY FEEDBACK ===== */
.social-share__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.social-share__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

.social-share__btn:hover .social-share__tooltip,
.social-share__tooltip.show {
  opacity: 1;
  visibility: visible;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .social-share--floating {
    display: none;
  }

  .social-share {
    justify-content: center;
  }

  .social-share__label {
    width: 100%;
    text-align: center;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .social-share__buttons {
    justify-content: center;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .social-share__btn {
    transition: none;
  }

  .social-share__btn:hover {
    transform: none;
  }

  .social-share--floating {
    transition: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .social-share {
    display: none;
  }
}
