/**
 * SocialShareButton Styles
 * Modern, responsive, and customizable social sharing component
 */

/* Button Styles */
.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  outline: none;
}

.social-share-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.social-share-btn .share-icon {
  transition: transform 0.3s ease;
}

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

/* Button Variants */
.social-share-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.social-share-btn.primary:hover {
  background: linear-gradient(135deg, #7c8ff0 0%, #8a5bb5 100%);
}

.social-share-btn.light {
  background: #fff;
  color: #333;
  border-color: #ddd;
}

.social-share-btn.light:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.social-share-btn.compact {
  padding: 8px 12px;
  font-size: 13px;
}

.social-share-btn.icon-only {
  padding: 10px;
  border-radius: 50%;
}

.social-share-btn.icon-only span {
  display: none;
}

/* Modal Overlay */
.social-share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.social-share-modal-overlay.active {
  opacity: 1;
}

/* Modal Content */
.social-share-modal-content {
  background: #282828;
  border-radius: 12px;
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-share-modal-overlay.active .social-share-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.social-share-modal-content.center {
  align-self: center;
}

.social-share-modal-content.bottom {
  align-self: flex-end;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Light Theme */
.social-share-modal-overlay.light .social-share-modal-content {
  background: #ffffff;
  color: #333;
}

/* Header */
.social-share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.social-share-modal-overlay.light .social-share-modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.social-share-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.social-share-modal-overlay.light .social-share-modal-header h3 {
  color: #333;
}

.social-share-modal-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.social-share-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.social-share-modal-overlay.light .social-share-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

/* Platforms Container */
.social-share-platforms {
  display: flex;
  gap: 12px;
  padding: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.social-share-platforms::-webkit-scrollbar {
  height: 6px;
}

.social-share-platforms::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.social-share-platforms::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.social-share-platforms::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Platform Button */
.social-share-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 80px;
  transition: transform 0.2s ease;
  outline: none;
}

.social-share-platform-btn:hover {
  transform: scale(1.05);
}

.social-share-platform-btn:active {
  transform: scale(0.95);
}

.social-share-platform-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.social-share-platform-btn:hover .social-share-platform-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.social-share-platform-icon svg {
  width: 28px;
  height: 28px;
}

.social-share-platform-btn span {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  text-align: center;
  max-width: 80px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.social-share-modal-overlay.light .social-share-platform-btn span {
  color: #333;
}

/* Link Container */
.social-share-link-container {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-share-link-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-share-modal-overlay.light .social-share-link-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

.social-share-link-input input {
  width: 100%;
  background: none;
  border: none;
  color: #3ea6ff;
  font-size: 14px;
  outline: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.social-share-modal-overlay.light .social-share-link-input input {
  color: #1877F2;
}

.social-share-link-input input::selection {
  background: #3ea6ff;
  color: #fff;
}

.social-share-copy-btn {
  background: #3ea6ff;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  outline: none;
}

.social-share-copy-btn:hover {
  background: #4db8ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(62, 166, 255, 0.3);
}

.social-share-copy-btn:active {
  transform: scale(0.95);
}

.social-share-copy-btn.copied {
  background: #00a650;
}

.social-share-copy-btn.copied:hover {
  background: #00b857;
}

/* Responsive Design */
@media (max-width: 600px) {
  .social-share-modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 12px 12px 0 0;
  }

  .social-share-modal-content.bottom {
    margin-top: auto;
  }

  .social-share-modal-header {
    padding: 12px 16px;
  }

  .social-share-modal-header h3 {
    font-size: 18px;
  }

  .social-share-platforms {
    padding: 16px;
  }

  .social-share-platform-btn {
    min-width: 70px;
  }

  .social-share-platform-icon {
    width: 48px;
    height: 48px;
  }

  .social-share-platform-icon svg {
    width: 24px;
    height: 24px;
  }

  .social-share-link-container {
    flex-direction: column;
    padding: 12px 16px 16px;
    gap: 8px;
  }

  .social-share-link-input {
    width: 100%;
  }

  .social-share-copy-btn {
    width: 100%;
  }

  .social-share-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Dark theme default */
.social-share-modal-overlay.dark .social-share-modal-content {
  background: #282828;
}

.social-share-modal-overlay.dark .social-share-modal-header h3,
.social-share-modal-overlay.dark .social-share-platform-btn span {
  color: #fff;
}

/* Accessibility */
.social-share-btn:focus-visible,
.social-share-modal-close:focus-visible,
.social-share-platform-btn:focus-visible,
.social-share-copy-btn:focus-visible {
  outline: 2px solid #3ea6ff;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .social-share-btn,
  .social-share-modal-overlay {
    display: none !important;
  }
}
