// Copy page button styles
.copy-page-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--watch-btn-border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--watch-btn-color);
  transition: all 0.2s ease;
  white-space: nowrap;
  
  &:hover {
    background: var(--watch-btn-hover-background);
    border-color: var(--primary-1);
    color: var(--primary-1);
    
    svg {
      stroke: var(--primary-1);
    }
  }
  
  &:active {
    transform: scale(0.98);
  }
  
  svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: stroke 0.2s ease;
  }
  
  &.copy-success {
    svg {
      stroke: var(--secondary-2);
    }
    
    .copy-btn-text {
      color: var(--secondary-2);
    }
  }
}

// Tooltip styles
.copy-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  padding: 6px 12px;
  background: var(--tooltip-background);
  color: var(--tooltip-color);
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 1000;
  
  &::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--tooltip-background);
  }
  
  &.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

// Tags and copy wrapper
.tags-and-copy-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 20px 0;
  min-height: 36px; // Ensure consistent height even without tags
  
  .tag-container {
    flex: 1 1 auto;
    margin: 0;
  }
  
  .copy-page-btn {
    flex: 0 0 auto;
    margin-left: auto; // Always pushes button to the right
  }
}

// Dark mode adjustments
[data-dark-mode] {
  .copy-page-btn {
    &:hover {
      border-color: var(--primary-2);
      color: var(--primary-2);
      
      svg {
        stroke: var(--primary-2);
      }
    }
  }
}

// Mobile responsive
@media (max-width: 768px) {
  .copy-page-btn {
    padding: 0 12px;
    font-size: 13px;
    
    svg {
      display: none;
    }
  }
  
  .tags-and-copy-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    
    .tag-container {
      width: 100%;
    }
    
    .copy-page-btn {
      width: 100%;
      justify-content: center;
    }
  }
}