/**
 * Share Button & Menu Styles
 * Add this to single-post.css
 */

/* ===================================
   SHARE BUTTON & MENU
   =================================== */

/* Share trigger button */
.share-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--tcp-space-2);
  background: transparent;
  border: 1px solid var(--tcp-gray-400);
  border-radius: 4px;
  padding: var(--tcp-space-2) var(--tcp-space-3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.post-meta .share-trigger {
  margin-left: auto;
}

.share-trigger:hover {
  background: var(--tcp-gray-100);
  border-color: var(--tcp-gray-600);
}

.share-text {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tcp-gray-700);
}

.share-icon {
  width: 18px;
  height: 18px;
  color: var(--tcp-gray-700);
  transition: transform 0.3s ease;
}

.share-trigger:hover .share-icon {
  transform: translateY(-2px);
}

.share-trigger.active .share-icon {
  transform: rotate(180deg);
}

/* Share Menu */
.share-menu {
  position: absolute;
  top: calc(100% + var(--tcp-space-2));
  right: 0;
  background: var(--tcp-white);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: var(--tcp-space-4);
  min-width: 280px;
  z-index: 1000;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.share-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.share-menu-title {
  font-family: var(--tcp-font-display);
  font-size: var(--tcp-text-lg);
  font-weight: 700;
  margin: 0 0 var(--tcp-space-4) 0;
  padding-bottom: var(--tcp-space-3);
  border-bottom: 1px solid var(--tcp-gray-200);
  color: var(--tcp-dark);
}

/* Share Options */
.share-option {
  display: flex;
  align-items: center;
  gap: var(--tcp-space-3);
  width: 100%;
  padding: var(--tcp-space-3) var(--tcp-space-4);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: var(--tcp-space-2);
}

.share-option:last-child {
  margin-bottom: 0;
}

.share-option:hover {
  background: var(--tcp-gray-100);
}

.share-option svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--tcp-gray-700);
  transition: color 0.2s ease;
}

.share-option span {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-sm);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--tcp-gray-800);
  text-align: left;
}

/* Individual hover colors */
.share-option[data-action="whatsapp"]:hover svg {
  color: #25d366;
}

.share-option[data-action="twitter"]:hover svg {
  color: #000000;
}

.share-option[data-action="facebook"]:hover svg {
  color: #1877f2;
}

.share-option[data-action="linkedin"]:hover svg {
  color: #0a66c2;
}

.share-option[data-action="telegram"]:hover svg {
  color: #0088cc;
}

.share-option.copy-link:hover svg {
  color: var(--tcp-primary);
}

/* Copy link success state */
.share-option.copy-link.copied {
  background: var(--tcp-primary);
}

.share-option.copy-link.copied span,
.share-option.copy-link.copied svg {
  color: var(--tcp-white);
}

/* Post meta adjustments for share button */
.post-meta {
  display: flex;
  align-items: center;
  gap: var(--tcp-space-4);
  flex-wrap: wrap;
  position: relative;
}

/* Share button container at bottom */
.post-share-bottom {
  margin-top: var(--tcp-space-6);
  padding-top: var(--tcp-space-6);
  border-top: 1px solid var(--tcp-gray-200);
  position: relative;
  display: flex;
  justify-content: center;
}

.post-share-bottom .share-trigger {
  margin: 0;
}

.post-share-bottom .share-menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(-10px);
}

.post-share-bottom .share-menu.active {
  transform: translateX(-50%) translateY(0);
}

/* Animation for share options */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.share-menu.active .share-option {
  animation: fadeInUp 0.3s ease backwards;
}

.share-menu.active .share-option:nth-child(2) {
  animation-delay: 0.05s;
}
.share-menu.active .share-option:nth-child(3) {
  animation-delay: 0.1s;
}
.share-menu.active .share-option:nth-child(4) {
  animation-delay: 0.15s;
}
.share-menu.active .share-option:nth-child(5) {
  animation-delay: 0.2s;
}
.share-menu.active .share-option:nth-child(6) {
  animation-delay: 0.25s;
}
.share-menu.active .share-option:nth-child(7) {
  animation-delay: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
  .share-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    min-width: 100%;
    max-width: 100%;
    transform: translateY(100%);
  }

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

  .post-share-bottom .share-menu {
    left: 0;
    transform: translateY(100%);
  }

  .post-share-bottom .share-menu.active {
    transform: translateY(0);
  }

  /* Overlay for mobile */
  .share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .share-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}
