/**
 * Enhanced Social Media Section Styles
 * Modern, gradient-based design for social sharing components
 */

:root {
  /* Modern gradient colors */
  --social-gradient-primary: linear-gradient(135deg, #4CAF50, #2E7D32);
  --social-gradient-secondary: linear-gradient(135deg, #1877F2, #0D47A1);
  --social-gradient-accent: linear-gradient(135deg, #E60023, #C2185B);
  --social-gradient-neutral: linear-gradient(135deg, #607D8B, #455A64);
  
  /* Card backgrounds */
  --social-card-bg: #ffffff;
  --social-card-bg-alt: #f8f9fa;
  
  /* Text colors */
  --social-text-primary: #0f0f0f;
  --social-text-secondary: #606060;
  --social-text-light: #ffffff;
  
  /* Accent colors */
  --social-accent-like: #4267B2;
  --social-accent-love: #F33E58;
  --social-accent-laugh: #F7B125;
  --social-accent-wow: #F7B125;
  --social-accent-sad: #747474;
  --social-accent-angry: #E94242;
  
  /* Shadows */
  --social-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --social-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --social-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  
  /* Animation */
  --social-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --social-transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --social-transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Social Card */
.enhanced-social-card {
  background-color: var(--social-card-bg);
  border-radius: 16px;
  box-shadow: var(--social-shadow-md);
  overflow: hidden;
  margin: 2rem 0;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  position: relative;
}

/* Stats Section */
.social-stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--social-card-bg-alt);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.social-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: var(--social-card-bg);
  border-radius: 12px;
  box-shadow: var(--social-shadow-sm);
  transition: transform var(--social-transition-normal);
}

.social-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--social-shadow-md);
}

.social-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--social-text-primary);
  margin-bottom: 0.25rem;
}

.social-stat-label {
  font-size: 0.9rem;
  color: var(--social-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-reactions-stat .social-stat-value {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.social-reaction-icons {
  display: flex;
  margin-right: 0.5rem;
}

.social-reaction-icon {
  font-size: 1.2rem;
  margin-right: -8px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Actions Section */
.social-actions-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.social-action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 12px;
  background-color: var(--social-card-bg-alt);
  color: var(--social-text-secondary);
  transition: all var(--social-transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.social-action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  opacity: 0;
  transition: opacity var(--social-transition-normal);
  z-index: 0;
}

.social-action-button:hover::before {
  opacity: 0.1;
}

.social-action-button.like-button::before {
  background: var(--social-accent-like);
}

.social-action-button.comment-button::before {
  background: var(--social-accent-wow);
}

.social-action-button.share-button::before {
  background: var(--social-accent-love);
}

.social-action-button.save-button::before {
  background: var(--social-accent-love);
}

.social-action-button:hover {
  transform: translateY(-4px);
  box-shadow: var(--social-shadow-sm);
}

.social-action-button:active {
  transform: translateY(0);
}

.social-action-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  z-index: 1;
}

.social-action-label {
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1;
}

/* Reactions Popup */
.social-reactions-popup {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  background-color: var(--social-card-bg);
  border-radius: 30px;
  box-shadow: var(--social-shadow-lg);
  display: flex;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  z-index: 10;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all var(--social-transition-normal);
}

.social-reactions-popup::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--social-card-bg);
}

.social-action-button.like-button:hover .social-reactions-popup {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.social-reaction {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--social-transition-fast);
  margin: 0 0.25rem;
  background-color: transparent;
}

.social-reaction:hover {
  transform: scale(1.2) translateY(-5px);
}

.social-reaction-emoji {
  font-size: 2rem;
  transition: all var(--social-transition-fast);
}

/* Pinterest Board Selector */
.pin-board-selector {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.95);
  background-color: var(--social-card-bg);
  border-radius: 16px;
  box-shadow: var(--social-shadow-lg);
  width: 300px;
  padding: 1.5rem;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: all var(--social-transition-normal);
}

.pin-board-selector::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--social-card-bg);
}

.social-action-button.save-button:hover .pin-board-selector {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.pin-board-header {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--social-text-primary);
  text-align: center;
}

.pin-board-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.pin-board-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--social-transition-fast);
  margin-bottom: 0.5rem;
}

.pin-board-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.pin-board-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  margin-right: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.pin-board-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--social-transition-normal);
}

.pin-board-item:hover .pin-board-thumbnail img {
  transform: scale(1.05);
}

.pin-board-info {
  flex: 1;
}

.pin-board-name {
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--social-text-primary);
}

.pin-board-count {
  font-size: 0.8rem;
  color: var(--social-text-secondary);
  margin: 0;
}

.pin-create-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--social-gradient-accent);
  color: var(--social-text-light);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--social-transition-normal);
}

.pin-create-board:hover {
  transform: translateY(-2px);
  box-shadow: var(--social-shadow-sm);
}

/* Comments Section */
.social-comments {
  padding: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: var(--social-card-bg-alt);
}

.social-comments-header {
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--social-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-comment {
  display: flex;
  margin-bottom: 1.5rem;
}

.social-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 1rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--social-shadow-sm);
}

.social-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-comment-content {
  flex: 1;
}

.social-comment-bubble {
  background-color: var(--social-card-bg);
  border-radius: 16px;
  padding: 1rem;
  color: var(--social-text-primary);
  font-size: 0.95rem;
  display: inline-block;
  max-width: 100%;
  box-shadow: var(--social-shadow-sm);
}

.social-comment-username {
  font-weight: 600;
  margin-right: 0.5rem;
  color: var(--social-text-primary);
}

.social-comment-actions {
  display: flex;
  margin-top: 0.5rem;
  margin-left: 1rem;
}

.social-comment-action {
  margin-right: 1rem;
  font-size: 0.8rem;
  color: var(--social-text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--social-transition-fast);
}

.social-comment-action:hover {
  color: var(--social-accent-like);
}

.social-comment-timestamp {
  font-size: 0.8rem;
  color: var(--social-text-secondary);
}

.social-comment-replies {
  margin-left: 3rem;
  margin-top: 1rem;
}

.social-comment-form {
  display: flex;
  margin-top: 1.5rem;
  gap: 1rem;
}

.social-comment-input {
  flex: 1;
  border: none;
  background-color: var(--social-card-bg);
  border-radius: 24px;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  min-height: 40px;
  box-shadow: var(--social-shadow-sm);
  transition: box-shadow var(--social-transition-normal);
}

.social-comment-input:focus {
  outline: none;
  box-shadow: var(--social-shadow-md);
}

/* Share Dialog */
.social-share-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--social-transition-normal);
  backdrop-filter: blur(4px);
}

.social-share-dialog.active {
  opacity: 1;
  pointer-events: auto;
}

.social-share-content {
  background-color: var(--social-card-bg);
  border-radius: 16px;
  width: 500px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--social-shadow-lg);
  transform: scale(0.95);
  transition: transform var(--social-transition-normal);
}

.social-share-dialog.active .social-share-content {
  transform: scale(1);
}

.social-share-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-share-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0;
  color: var(--social-text-primary);
}

.social-share-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--social-text-secondary);
  transition: color var(--social-transition-fast);
}

.social-share-close:hover {
  color: var(--social-text-primary);
}

.social-share-body {
  padding: 1.5rem;
}

.social-share-preview {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--social-shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.social-share-image {
  width: 100%;
  height: 250px;
  background-color: var(--social-card-bg-alt);
}

.social-share-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-share-info {
  padding: 1.5rem;
}

.social-share-url {
  font-size: 0.8rem;
  color: var(--social-text-secondary);
  margin: 0 0 0.5rem 0;
}

.social-share-headline {
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--social-text-primary);
}

.social-share-description {
  font-size: 0.9rem;
  color: var(--social-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.social-share-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-share-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--social-transition-normal);
  background-color: var(--social-card-bg-alt);
}

.social-share-platform:hover {
  transform: translateY(-4px);
  box-shadow: var(--social-shadow-sm);
}

.social-share-platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: transform var(--social-transition-fast);
}

.social-share-platform:hover .social-share-platform-icon {
  transform: scale(1.1);
}

.social-share-platform-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--social-text-secondary);
}

.social-share-platform.facebook .social-share-platform-icon {
  background-color: #1877F2;
  color: white;
}

.social-share-platform.twitter .social-share-platform-icon {
  background-color: #1DA1F2;
  color: white;
}

.social-share-platform.pinterest .social-share-platform-icon {
  background-color: #E60023;
  color: white;
}

.social-share-platform.whatsapp .social-share-platform-icon {
  background-color: #25D366;
  color: white;
}

.social-share-platform.linkedin .social-share-platform-icon {
  background-color: #0077B5;
  color: white;
}

.social-share-platform.email .social-share-platform-icon {
  background-color: #EA4335;
  color: white;
}

.social-share-input {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--social-shadow-sm);
}

.social-share-input input {
  flex: 1;
  border: none;
  padding: 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: var(--social-card-bg-alt);
}

.social-share-input input:focus {
  outline: none;
}

.social-share-input button {
  background: var(--social-gradient-secondary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--social-transition-normal);
}

.social-share-input button:hover {
  opacity: 0.9;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .social-stats-container,
  .social-actions-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .social-share-platforms {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .social-stats-container {
    grid-template-columns: 1fr;
  }
  
  .social-actions-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .social-share-platforms {
    grid-template-columns: 1fr;
  }
  
  .social-comment-avatar {
    width: 32px;
    height: 32px;
  }
}
