/* Social Sharing System Styles */
.social-sharing-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-light, #f8f9fa);
  border-radius: 8px;
  border: 1px solid var(--border-color, #e1e5e9);
}

.social-sharing-header {
  margin-bottom: 1rem;
}

.social-sharing-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color, #333);
}

.social-sharing-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color, #e1e5e9);
  border-radius: 6px;
  background: white;
  color: var(--text-color, #333);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.social-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-share-btn:active {
  transform: translateY(0);
}

/* Platform-specific colors */
.social-share-btn--twitter {
  background: #1DA1F2;
  border-color: #1DA1F2;
  color: white;
}

.social-share-btn--twitter:hover {
  background: #1a91da;
}

.social-share-btn--linkedin {
  background: #0077B5;
  border-color: #0077B5;
  color: white;
}

.social-share-btn--linkedin:hover {
  background: #00669c;
}

.social-share-btn--facebook {
  background: #1877F2;
  border-color: #1877F2;
  color: white;
}

.social-share-btn--facebook:hover {
  background: #166fe5;
}

.social-share-btn--reddit {
  background: #FF4500;
  border-color: #FF4500;
  color: white;
}

.social-share-btn--reddit:hover {
  background: #e63900;
}

.social-share-btn--hackernews {
  background: #FF6600;
  border-color: #FF6600;
  color: white;
}

.social-share-btn--hackernews:hover {
  background: #e65c00;
}

.social-share-btn--email {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
}

.social-share-btn--email:hover {
  background: #5a6268;
}

.social-share-btn--copy {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.social-share-btn--copy:hover {
  background: #218838;
}

.social-share-btn--copied {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.social-share-icon {
  font-size: 1rem;
  line-height: 1;
}

.social-share-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.social-share-count {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: 0.25rem;
  min-width: 2rem;
  text-align: center;
}

.social-share-count--loaded {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.125rem 0.375rem;
}

.social-sharing-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted, #666);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #e1e5e9);
}

.total-shares-count {
  font-weight: 600;
  color: var(--brand-color, #4158D0);
}

/* Animation states */
.social-share-btn--shared {
  animation: sharePulse 0.6s ease-out;
}

@keyframes sharePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(65, 88, 208, 0.3);
  }
  100% {
    transform: scale(1);
  }
}

/* Compact layout */
.social-sharing-container.social-sharing--compact {
  padding: 1rem;
}

.social-sharing-container.social-sharing--compact .social-share-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.social-sharing-container.social-sharing--compact .social-share-label {
  display: none;
}

/* Minimal layout */
.social-sharing-container.social-sharing--minimal .social-share-btn {
  padding: 0.375rem;
  border-radius: 50%;
  min-width: 2.5rem;
  height: 2.5rem;
  justify-content: center;
}

.social-sharing-container.social-sharing--minimal .social-share-label {
  display: none;
}

/* Dark theme */
[data-theme="dark"] .social-sharing-container {
  background: #2a2a2a;
  border-color: #444;
}

[data-theme="dark"] .social-sharing-header h4 {
  color: #e0e0e0;
}

[data-theme="dark"] .social-share-btn {
  background: #1a1a1a;
  border-color: #444;
  color: #e0e0e0;
}

[data-theme="dark"] .social-share-btn:hover {
  background: #333;
}

[data-theme="dark"] .social-sharing-stats {
  color: #aaa;
  border-color: #444;
}

[data-theme="dark"] .total-shares-count {
  color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
  .social-sharing-container {
    margin: 1rem 0;
    padding: 1rem;
  }
  
  .social-sharing-buttons {
    gap: 0.5rem;
  }
  
  .social-share-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .social-share-label {
    display: none;
  }
  
  .social-share-count {
    min-width: 1.5rem;
    font-size: 0.625rem;
  }
}

@media (max-width: 480px) {
  .social-sharing-buttons {
    justify-content: space-between;
  }
  
  .social-share-btn {
    flex: 1;
    justify-content: center;
    min-width: auto;
    padding: 0.5rem 0.25rem;
  }
  
  .social-share-icon {
    font-size: 0.875rem;
  }
}

/* Print styles */
@media print {
  .social-sharing-container {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .social-share-btn {
    transition: none;
  }
  
  .social-share-btn:hover {
    transform: none;
  }
  
  .social-share-btn--shared {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .social-share-btn {
    border-width: 2px;
  }
  
  .social-share-btn:focus {
    outline: 2px solid var(--focus-color, #4158D0);
    outline-offset: 2px;
  }
}

/* Focus states */
.social-share-btn:focus {
  outline: 2px solid var(--focus-color, #4158D0);
  outline-offset: 2px;
}

.social-share-btn:focus:not(:focus-visible) {
  outline: none;
}

.social-share-btn:focus-visible {
  outline: 2px solid var(--focus-color, #4158D0);
  outline-offset: 2px;
}